Tue 27 Aug 00:14:56 CEST 2024

This commit is contained in:
sbosse 2024-08-27 00:15:24 +02:00
parent de5c2d7fdb
commit fff72505c9

21
test/test-ice.js Normal file
View File

@ -0,0 +1,21 @@
var x = csv.read('test-c45-3-X.csv'),
y = csv.read('test-c45-3-Y.csv');
x.shift(); // remove header
y.shift();
// print(y)
var model = ml.learn({
algorithm:ml.ML.ICE,
x:x,
y:y,
eps:0.01
});
var targets,samples = csv.read('test-c45-3-S.csv');
samples.shift();
targets=ml.stats.utils.column(samples,x[0].length);
samples=ml.stats.utils.select(samples,[0,x[0].length-1]);
print(toJSON(model).length+' Bytes')
// print(ml.print(model))
print(ml.classify(model,samples))