Package org.fnlp.ml.types.sv

Examples of org.fnlp.ml.types.sv.SparseMatrix.elementAt()


    SparseMatrix matrixWVWH = matrixTranW.mutiplyMatrix(matrixVWH);
    for (int i = h.vector.size(); i-- > 0;) {
      itH.advance();
      matrixHWVWH.set(itH.key(),
          itH.value() * matrixWVWH.elementAt(itH.key()));
    }
    return matrixHWVWH;
  }

  SparseMatrix updateW() {
View Full Code Here


     TLongFloatIterator itV = v.vector.iterator();
    TLongFloatIterator itW = w.vector.iterator();
    for (int i = v.vector.size(); i-- > 0;) {
      itV.advance();
      matrixVWH.set(itV.key(),
          itV.value() / (matrixWH.elementAt(itV.key()) + eps));
    }
    SparseMatrix matrixTranH = h.trans();

    SparseMatrix matrixVWHH = matrixVWH.mutiplyMatrix(matrixTranH);
    for (int i = w.vector.size(); i-- > 0;) {
View Full Code Here

    SparseMatrix matrixVWHH = matrixVWH.mutiplyMatrix(matrixTranH);
    for (int i = w.vector.size(); i-- > 0;) {
      itW.advance();
      matrixWVWHH.set(itW.key(),
          itW.value() * matrixVWHH.elementAt(itW.key()));
    }
    return matrixWVWHH;
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.