From ae015f2c1a81d0a02d624202d8edad5d1979651a Mon Sep 17 00:00:00 2001 From: sbosse Date: Tue, 27 Aug 2024 00:16:10 +0200 Subject: [PATCH] Tue 27 Aug 00:14:56 CEST 2024 --- test/test-ml-pca1.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/test-ml-pca1.js diff --git a/test/test-ml-pca1.js b/test/test-ml-pca1.js new file mode 100644 index 0000000..893de44 --- /dev/null +++ b/test/test-ml-pca1.js @@ -0,0 +1,18 @@ +var data = load('test-data-iris.json'); + + +var dataX=ml.preprocess(data,'m', + {features: + ['length','width','petal_length','petal_width'] +}).data; + +// TODO; update ML from workbook ML-X + +var eigenX=ml.pca.getEigenVectors(dataX); + +var dataZ=ml.pca.computeAdjustedData(dataX,eigenX[0]) + +var dataXR=ML.pca.computeOriginalData( + dataZ.formattedAdjustedData, + dataZ.selectedVectors, + dataZ.avgData).formattedOriginalData;