claczny / VizBin

Repository of our application for human-augmented binning
27 stars 14 forks source link

Improving efficient of PrincipalComponentsAnalysisMtj.java #9

Closed claczny closed 9 years ago

claczny commented 9 years ago

PrincipalComponentsAnalysisMtj.java includes the following fields:

double[][]  A_init;
DenseMatrix A;
DenseMatrix Y;

and A is initialized by A_init. A_init is no longer used afterwards and should be cleared from the memory. Moreover, DenseMatrix extends AbstractDenseMatrix and AbstractDenseMatrix implements public void set(int row, int column, double value) which could then be used to directly populate the matrices A and Y, thus saving one copy of the data. Since A is modified during the singular value decomposition, we need to create and keep Y.

claczny commented 9 years ago

Actually, we do not necessarily need to keep Y. We would only need it if we would like to compute the Scores for all the points by matrix multiplication of Y with V_red. If we are computing the projection per individual point, Y is not needed.

claczny commented 9 years ago

Close, s.a. #8 .