pca icon indicating copy to clipboard operation
pca copied to clipboard

Uncaught Error: no convergence.

Open ailton-felix opened this issue 5 years ago • 0 comments

hello,

I'm using a database with 1648 samples and 1180 features. When using the getEigenVectors method, I get the following response after some time: Uncaught Error: no convergence. What does that mean? Would it be a problem with the database? When I use fewer examples, like 1009, the problem does not happen.

Here are some pieces of code:

let dataset:number[][] = readCSV('http://127.0.0.1:8080/file/segments_development.csv');
...
const data = principalComponentsVariances(dataset);
...
const principalComponentsVariances = (dataset) => {
  console.log('computing eigenVectors...');
  const eigenVectors = PCA.getEigenVectors(dataset); //break here
  console.log('eigenVectors computed');
  const featuresNumber = eigenVectors.length;
  let variances = [];

  for (let i=0; i < featuresNumber; ++i) {
    if(i%100 == 0) console.log('variance', i);
    variances.push(PCA.computePercentageExplained(eigenVectors, ...eigenVectors.slice(0, i + 1)));
  }

  return variances;
}

I am grateful for the attention.

ailton-felix avatar Sep 23 '20 21:09 ailton-felix