diff --git a/public/algorithms/updater-tree.js b/public/algorithms/updater-tree.js index 1b25bf1..88b4827 100644 --- a/public/algorithms/updater-tree.js +++ b/public/algorithms/updater-tree.js @@ -48,7 +48,7 @@ function buildDecisionTreeUpdate( if (isChanged) { //var maxDif, attribute1, attribute2, match, notMatch, L_weight, predicateName, predicate; - console.log('@ ISCHANGE'); + console.log('@ ISCHANGE _ HUBERT'); var expr = oldAlgorithm[0]; bestTests = oldTree.tests; switch (expr) { @@ -60,8 +60,8 @@ function buildDecisionTreeUpdate( match = result.match; notMatch = result.notMatch; predicate = result.predicateName; - console.log('@ ISCHANGE - c45'); - console.log(result); + console.log('@ ISCHANGE - c45 - HUBERT'); + console.log(result, changedAttribute1, changedAttribute2); break; case 'TSP': console.log('t'); @@ -432,7 +432,7 @@ function tspisChange(changedAttribute1, changedAttribute2, trainingSet, category for (let element of trainingSet) { const attribute = element[categoryAttr]; - if (element[changedAttribute1] < element[changedAttribute2]) { + if (parseFloat(element[changedAttribute1]) < parseFloat(element[changedAttribute2])) { left++; leftList.push(element); classMatrix[0][allClasses.indexOf(attribute)]++; @@ -486,7 +486,7 @@ function tspwisChange(changedAttribute1, changedAttribute2, weight, trainingSet, for (let element of trainingSet) { const attribute = element[categoryAttr]; - if (element[changedAttribute1] < weight * element[changedAttribute2]) { + if (parseFloat(element[changedAttribute1]) < weight * parseFloat(element[changedAttribute2])) { left++; leftList.push(element); classMatrix[0][allClasses.indexOf(attribute)]++; diff --git a/src/components/Main.jsx b/src/components/Main.jsx index 3e030ae..6f47177 100644 --- a/src/components/Main.jsx +++ b/src/components/Main.jsx @@ -7,6 +7,7 @@ import { BuilderConfigProvider } from '../contexts/BuilderConfigContext'; import { TestTreeProvider } from '../contexts/TestTreeContext'; import ModelBuilder from './ModelBuilder'; import { Footer } from './Footer'; +import { Readme } from './Readme'; function Main() { const [builder, setBuilder] = useState({}); @@ -56,7 +57,10 @@ function Main() { ) ) : ( -
Deploy your set
+
+ Deploy your set + +
)} diff --git a/src/components/Readme.jsx b/src/components/Readme.jsx new file mode 100644 index 0000000..e046d0f --- /dev/null +++ b/src/components/Readme.jsx @@ -0,0 +1,12 @@ +import { Box } from '@chakra-ui/react'; +import React from 'react'; + +export const Readme = () => ( + + Readme + What is it? + Examples of data sets: + 1 + 2 + +);