-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
What is wrong?
after training on iris data https://archive.ics.uci.edu/ml/datasets/Iris/ output of one iris is massively higher than the others
How do we replicate the issue?
download the csv of data
const brain = require('brain.js');
const net = new brain.NeuralNetwork();
const fs = require('fs');
const data = fs.readFileSync('./iris.csv').toString();
const trainingData = data.split('\r\n').map((d) => {
const [slength, swidth, plength, pwidth, flower] = d.split(',');
return {
input: {
slength: slength / 10,
swidth: swidth / 10,
plength: plength / 10,
pwidth: pwidth / 10,
},
output: {
[flower]: 1,
},
};
});
const trainResults = net.train(trainingData);
console.log(trainResults);
const result = net.run({
slength: 0.51,
swidth: 0.35,
plength: 0.13999999999999999,
pwidth: 0.1 });
console.log(result);
How important is this (1-5)?
3
Expected behavior
{ 'Iris-setosa': 0.9973204731941223,
'Iris-versicolor': 0.003389077726751566,
'Iris-virginica': 2.462011443240403e-13 }
should be more like
{ 'Iris-setosa': 0.9973204731941223,
'Iris-versicolor': 0.003389077726751566,
'Iris-virginica': 0.003 }
Other Comments
training results
{ error: 0.008838672393814171, iterations: 20000 }
Metadata
Metadata
Assignees
Labels
No labels