diff --git a/package-lock.json b/package-lock.json index 881f18f..a3e69e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16689,8 +16689,7 @@ "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "optional": true + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "uuid4": { "version": "1.1.4", diff --git a/package.json b/package.json index 755c8f6..c677212 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "react-scripts": "4.0.1", "react-select-search": "^2.2.4", "react-table": "^7.6.3", + "uuid": "^8.3.2", "web-vitals": "^0.2.4" }, "scripts": { diff --git a/src/components/ConfusionMatrix/Table.jsx b/src/components/ConfusionMatrix/Table.jsx index 1b2563f..8d6dc4c 100644 --- a/src/components/ConfusionMatrix/Table.jsx +++ b/src/components/ConfusionMatrix/Table.jsx @@ -13,6 +13,7 @@ import { ModalFooter, useDisclosure, } from '@chakra-ui/react'; +import { v4 as uuidv4 } from 'uuid'; import { Table, Thead, Tbody, Tfoot, Tr, Th, Td, TableCaption } from '@chakra-ui/react'; import { predict } from '../../utils/predict'; @@ -34,7 +35,7 @@ function TableComponent({ confusionMatrix, headers }) {
- Training accuracy:{' '} - {allAccuracy?.reduce((partialSum, a) => partialSum + a.training, 0) / allAccuracy.length} -
-- Test accuracy: {allAccuracy?.reduce((partialSum, a) => partialSum + a.test, 0) / allAccuracy.length} -
+Training accuracy: {trainAcc}
+Test accuracy: {testAcc}
Tree {selectedIndex + 1}
@@ -118,7 +116,7 @@ function CrossValidator({ builder, chunks, treeModels }) {+
Tree {i}{' '}
clickSelectTree(item, index)}>
Tree {index + 1}