/** * Created by joonkukang on 2014. 1. 16.. */ var utils = require('./utils'); var math = utils.math; let nmf = module.exports; nmf.factorize = function(options) { var fc = options['features']; var matrix = options['matrix']; var epochs = options['epochs']; var row = math.shape(matrix)[0], col = math.shape(matrix)[1]; var a = math.randMat(row,fc,0,1); var b = math.randMat(fc,col,0,1); var i; for(i=0 ; i