public final class Word2Vec extends Estimator<Word2VecModel>
Map(String, Vector)
, i.e. transforms a word into a code for further
natural language processing or machine learning process.Modifier and Type | Method and Description |
---|---|
Word2VecModel |
fit(DataFrame dataset)
Fits a model to the input data.
|
int |
getMinCount() |
int |
getNumPartitions() |
int |
getVectorSize() |
IntParam |
minCount()
The minimum number of times a token must appear to be included in the word2vec model's
vocabulary.
|
IntParam |
numPartitions()
Number of partitions for sentences of words.
|
Word2Vec |
setInputCol(String value) |
Word2Vec |
setMaxIter(int value) |
Word2Vec |
setMinCount(int value) |
Word2Vec |
setNumPartitions(int value) |
Word2Vec |
setOutputCol(String value) |
Word2Vec |
setSeed(long value) |
Word2Vec |
setStepSize(double value) |
Word2Vec |
setVectorSize(int value) |
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
String |
uid() |
StructType |
validateAndTransformSchema(StructType schema)
Validate and transform the input schema.
|
IntParam |
vectorSize()
The dimension of the code that you want to transform from words.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copy, copyValues, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public String uid()
public Word2Vec setInputCol(String value)
public Word2Vec setOutputCol(String value)
public Word2Vec setVectorSize(int value)
public Word2Vec setStepSize(double value)
public Word2Vec setNumPartitions(int value)
public Word2Vec setMaxIter(int value)
public Word2Vec setSeed(long value)
public Word2Vec setMinCount(int value)
public Word2VecModel fit(DataFrame dataset)
Estimator
fit
in class Estimator<Word2VecModel>
dataset
- (undocumented)public StructType transformSchema(StructType schema)
PipelineStage
Derives the output schema from the input schema.
transformSchema
in class PipelineStage
schema
- (undocumented)public IntParam vectorSize()
public int getVectorSize()
public IntParam numPartitions()
public int getNumPartitions()
public IntParam minCount()
public int getMinCount()
public StructType validateAndTransformSchema(StructType schema)
schema
- (undocumented)