From a1265a35d1ba6e5bea10d175ee642b45b09ec68e Mon Sep 17 00:00:00 2001 From: sbosse Date: Tue, 27 Aug 2024 00:15:07 +0200 Subject: [PATCH] Tue 27 Aug 00:14:56 CEST 2024 --- test/test-c45-3.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/test-c45-3.js diff --git a/test/test-c45-3.js b/test/test-c45-3.js new file mode 100644 index 0000000..ee0e9fe --- /dev/null +++ b/test/test-c45-3.js @@ -0,0 +1,19 @@ +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))