@@ -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