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;