diff --git a/test/test-ice.js b/test/test-ice.js new file mode 100644 index 0000000..184a18d --- /dev/null +++ b/test/test-ice.js @@ -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))