org.carrot2.matrix.factorization.seeding
Class KMeansSeedingStrategy

java.lang.Object
  extended by org.carrot2.matrix.factorization.seeding.KMeansSeedingStrategy
All Implemented Interfaces:
ISeedingStrategy

public class KMeansSeedingStrategy
extends Object
implements ISeedingStrategy

Matrix seeding based on the k-means algorithms.


Constructor Summary
KMeansSeedingStrategy()
          Creates the KMeansSeedingStrategy.
KMeansSeedingStrategy(int maxIterations)
          Creates the KMeansSeedingStrategy.
 
Method Summary
 void seed(org.apache.mahout.math.matrix.DoubleMatrix2D A, org.apache.mahout.math.matrix.DoubleMatrix2D U, org.apache.mahout.math.matrix.DoubleMatrix2D V)
          Initializes values of the provided U and V matrices.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KMeansSeedingStrategy

public KMeansSeedingStrategy()
Creates the KMeansSeedingStrategy.


KMeansSeedingStrategy

public KMeansSeedingStrategy(int maxIterations)
Creates the KMeansSeedingStrategy.

Parameters:
maxIterations - maximum number of KMeans iterations.
Method Detail

seed

public void seed(org.apache.mahout.math.matrix.DoubleMatrix2D A,
                 org.apache.mahout.math.matrix.DoubleMatrix2D U,
                 org.apache.mahout.math.matrix.DoubleMatrix2D V)
Description copied from interface: ISeedingStrategy
Initializes values of the provided U and V matrices. The A matrix is the input matrix to be factorized.

Specified by:
seed in interface ISeedingStrategy
Parameters:
A - matrix to be factorized
U - left factorized matrix to be seeded
V - right factorized matrix to be seeded

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) Dawid Weiss, Stanislaw Osinski