Class PCAModel

All Implemented Interfaces:
Serializable, VectorTransformer, scala.Serializable

public class PCAModel extends Object implements VectorTransformer
Model fitted by PCA that can project vectors to a low-dimensional space using PCA.

param: k number of principal components. param: pc a principal components Matrix. Each column is one principal component.

See Also:
  • Method Details

    • explainedVariance

      public DenseVector explainedVariance()
    • k

      public int k()
    • pc

      public DenseMatrix pc()
    • transform

      public Vector transform(Vector vector)
      Transform a vector by computed Principal Components.

      Specified by:
      transform in interface VectorTransformer
      vector - vector to be transformed. Vector must be the same length as the source vectors given to
      transformed vector. Vector will be of length k.