@@ -49,26 +49,6 @@ describe('Non-negative Matrix Factorization', () => {
49
49
expect ( positivity ( nA ) ) . toEqual ( true ) ;
50
50
expect ( nA . error . max ( ) ) . toBeLessThan ( 0.000001 ) ;
51
51
} ) ;
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
-
72
52
it ( 'Factorization test II' , ( ) => {
73
53
let A = new Matrix ( [
74
54
[ 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ,
0 commit comments