public final class Word2Vec extends Estimator<Word2VecModel> implements Word2VecBase, DefaultParamsWritable
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 |
---|---|
Word2Vec |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
Word2VecModel |
fit(Dataset<?> dataset)
Fits a model to the input data.
|
static Word2Vec |
load(String path) |
static MLReader<T> |
read() |
Word2Vec |
setInputCol(String value) |
Word2Vec |
setMaxIter(int value) |
Word2Vec |
setMaxSentenceLength(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) |
Word2Vec |
setWindowSize(int value) |
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxSentenceLength, getMinCount, getNumPartitions, getVectorSize, getWindowSize, maxSentenceLength, minCount, numPartitions, validateAndTransformSchema, vectorSize, windowSize
getInputCol, inputCol
getOutputCol, outputCol
getMaxIter, maxIter
getStepSize, stepSize
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
toString
write
save
initializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public static Word2Vec load(String path)
public static MLReader<T> read()
public String uid()
Identifiable
uid
in interface Identifiable
public Word2Vec setInputCol(String value)
public Word2Vec setOutputCol(String value)
public Word2Vec setVectorSize(int value)
public Word2Vec setWindowSize(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 Word2Vec setMaxSentenceLength(int value)
public Word2VecModel fit(Dataset<?> dataset)
Estimator
fit
in class Estimator<Word2VecModel>
dataset
- (undocumented)public StructType transformSchema(StructType schema)
PipelineStage
Check transform validity and derive the output schema from the input schema.
We check validity for interactions between parameters during transformSchema
and
raise an exception if any parameter value is invalid. Parameter value checks which
do not depend on other parameters are handled by Param.validate()
.
Typical implementation should first conduct verification on schema change and parameter validity, including complex parameter interaction checks.
transformSchema
in class PipelineStage
schema
- (undocumented)public Word2Vec copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Estimator<Word2VecModel>
extra
- (undocumented)