public class CountVectorizer extends Estimator<CountVectorizerModel>
CountVectorizerModel
.Constructor and Description |
---|
CountVectorizer() |
CountVectorizer(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
CountVectorizer |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
CountVectorizerModel |
fit(DataFrame dataset)
Fits a model to the input data.
|
double |
getMinDF() |
double |
getMinTF() |
int |
getVocabSize() |
static CountVectorizer |
load(java.lang.String path) |
DoubleParam |
minDF()
Specifies the minimum number of different documents a term must appear in to be included
in the vocabulary.
|
DoubleParam |
minTF()
Filter to ignore rare words in a document.
|
CountVectorizer |
setInputCol(java.lang.String value) |
CountVectorizer |
setMinDF(double value) |
CountVectorizer |
setMinTF(double value) |
CountVectorizer |
setOutputCol(java.lang.String value) |
CountVectorizer |
setVocabSize(int value) |
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
java.lang.String |
uid()
An immutable unique ID for the object and its derivatives.
|
StructType |
validateAndTransformSchema(StructType schema)
Validates and transforms the input schema.
|
IntParam |
vocabSize()
Max size of the vocabulary.
|
transformSchema
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn, validateParams
toString
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public CountVectorizer(java.lang.String uid)
public CountVectorizer()
public static CountVectorizer load(java.lang.String path)
public java.lang.String uid()
Identifiable
uid
in interface Identifiable
public CountVectorizer setInputCol(java.lang.String value)
public CountVectorizer setOutputCol(java.lang.String value)
public CountVectorizer setVocabSize(int value)
public CountVectorizer setMinDF(double value)
public CountVectorizer setMinTF(double value)
public CountVectorizerModel fit(DataFrame dataset)
Estimator
fit
in class Estimator<CountVectorizerModel>
dataset
- (undocumented)public StructType transformSchema(StructType schema)
PipelineStage
Derives the output schema from the input schema.
transformSchema
in class PipelineStage
schema
- (undocumented)public CountVectorizer copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Estimator<CountVectorizerModel>
extra
- (undocumented)defaultCopy()
public IntParam vocabSize()
Default: 2^18^
public int getVocabSize()
public DoubleParam minDF()
Default: 1
public double getMinDF()
public StructType validateAndTransformSchema(StructType schema)
public DoubleParam minTF()
Note that the parameter is only used in transform of CountVectorizerModel
and does not
affect fitting.
Default: 1
public double getMinTF()