From fff72505c90d8e1716369524adab57419ef05c26 Mon Sep 17 00:00:00 2001 From: sbosse Date: Tue, 27 Aug 2024 00:15:24 +0200 Subject: [PATCH] Tue 27 Aug 00:14:56 CEST 2024 --- test/test-ice.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/test-ice.js 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))