org.apache.spark.mllib.feature
Class Word2Vec
Object
org.apache.spark.mllib.feature.Word2Vec
- All Implemented Interfaces:
- java.io.Serializable, Logging
public class Word2Vec
- extends Object
- implements scala.Serializable, Logging
- See Also:
- Serialized Form
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.spark.Logging |
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning |
Word2Vec
public Word2Vec()
setVectorSize
public Word2Vec setVectorSize(int vectorSize)
setLearningRate
public Word2Vec setLearningRate(double learningRate)
setNumPartitions
public Word2Vec setNumPartitions(int numPartitions)
setNumIterations
public Word2Vec setNumIterations(int numIterations)
setSeed
public Word2Vec setSeed(long seed)
setMinCount
public Word2Vec setMinCount(int minCount)
fit
public <S extends scala.collection.Iterable<String>> Word2VecModel fit(RDD<S> dataset)
fit
public <S extends Iterable<String>> Word2VecModel fit(JavaRDD<S> dataset)
- Computes the vector representation of each word in vocabulary (Java version).
- Parameters:
dataset
- a JavaRDD of words
- Returns:
- a Word2VecModel