Example usage for org.apache.mahout.math.decomposer.lanczos LanczosState LanczosState

List of usage examples for org.apache.mahout.math.decomposer.lanczos LanczosState LanczosState

Introduction

In this page you can find the example usage for org.apache.mahout.math.decomposer.lanczos LanczosState LanczosState.

Prototype

public LanczosState(VectorIterable corpus, int desiredRank, Vector initialVector) 

Source Link

Usage

From source file:io.ssc.relationdiscovery.SVD.java

License:Open Source License

public SVD(Matrix A, int rank) throws IOException {
    this.A = A;/*from w  w w  .ja  v a  2 s.  co  m*/
    this.rank = rank;

    Vector initialVector = new DenseVector(A.numCols());
    initialVector.assign(1.0 / Math.sqrt(A.numCols()));

    lanczosState = new LanczosState(A, rank + OVERSHOOT, initialVector);
}