Package Exports
- ml-ngmca
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-ngmca) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
nGMCA - Non-negative Generalized Morphological Component Analysis
A tool for Non-negative matrix factorization.
Instalation
$ npm install ml-ngmca
Usage
import { Matrix } from 'ml-matrix';
import { ngmca } from 'ml-ngmca';
let A = new Matrix([
[1, 2, 3],
[4, 5, 6],
]);
let S = new Matrix([
[1, 2],
[3, 4],
[5, 6],
]);
let v = A.mmul(S);
const options = {
maximumIteration: 200,
phaseRatio: 0.4,
};
const result = ngmca(v, 2, options);
// result has properties A and S, the estimated matrices