I got the following error
Cannot read property 'overview' of undefined
I cannot figure out what this is.
<template>
<tr v-for="(row, fold) of perFold" :key="fold">
<td>{{ fold + 2 }}</td>
<td>{{ row.correct }}</td>
<td>{{ row.incorrect }}</td>
<td>{{ row.accuracy.toFixed(2) }}%</td>
</tr>
</template>
<script>
export default {
methods: {
perFold () {
let data = this.result[this.attr].knn
let perFold = []
for (let i = 2; i <= 10; i++) {
let label = (i < 10 ? '0' : '') + i;
let fold = data[`fold-${label}`]
perFold.push(fold[fold.overview.bestAttr])
}
return perFold
}
}
}
</script>
Then in the browser, I get the following error
TypeError Cannot read property 'overview' of undefined
When I comment this line
perFold.push(fold[fold.overview.bestAttr])
I then do not have any error, but the results expected in my browser are empty.