Skip to content

Commit e309fb9

Browse files
committed
Moved an example
1 parent 29a5c40 commit e309fb9

File tree

1 file changed

+0
-20
lines changed
  • src/__tests__/decompositions

1 file changed

+0
-20
lines changed

src/__tests__/decompositions/nnmf.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,6 @@ describe('Non-negative Matrix Factorization', () => {
4949
expect(positivity(nA)).toEqual(true);
5050
expect(nA.error.max()).toBeLessThan(0.000001);
5151
});
52-
it('Base I', () => {
53-
let A = new Matrix([
54-
[0, 20, 100, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
55-
[0, 0, 0, 0, 0, 30, 100, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
56-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 100, 5, 0, 0, 0, 0, 0, 0],
57-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 100, 15, 0, 0, 0],
58-
[0, 0, 0, 0, 0, 0, 0, 10, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0],
59-
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 100, 10],
60-
[0, 20, 100, 20, 0, 0, 0, 0, 0, 5, 100, 5, 0, 0, 0, 20, 200, 20]
61-
]);
62-
63-
let nA = new NNMF(A, 1, 0.001, { maxIterations: 1000000 });
64-
65-
// console.table(nA.X);
66-
// console.table(nA.Y);
67-
68-
expect(positivity(nA)).toEqual(true);
69-
expect(nA.error.max()).toBeLessThan(100);
70-
});
71-
7252
it('Factorization test II', () => {
7353
let A = new Matrix([
7454
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0],

0 commit comments

Comments
 (0)