jam/test/test-c45-3.js

20 lines
354 B
JavaScript
Raw Normal View History

2024-08-27 00:15:07 +02:00
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.C45,
x:x,
y:y,
});
var samples = csv.read('test-c45-3-S.csv');
samples.shift();
print(toJSON(model).length+' Bytes')
// print(ml.print(model))
print(ml.classify(model,samples))