19 lines
421 B
JavaScript
19 lines
421 B
JavaScript
|
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;
|