public class StringIndexer extends Estimator<StringIndexerModel>
IndexToString} for the inverse transformation
,
Serialized FormConstructor and Description |
---|
StringIndexer() |
StringIndexer(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
StringIndexer |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
StringIndexerModel |
fit(DataFrame dataset)
Fits a model to the input data.
|
java.lang.String |
getHandleInvalid() |
java.lang.String |
getInputCol() |
java.lang.String |
getOutputCol() |
Param<java.lang.String> |
handleInvalid()
Param for how to handle invalid entries.
|
Param<java.lang.String> |
inputCol()
Param for input column name.
|
static StringIndexer |
load(java.lang.String path) |
Param<java.lang.String> |
outputCol()
Param for output column name.
|
StringIndexer |
setHandleInvalid(java.lang.String value) |
StringIndexer |
setInputCol(java.lang.String value) |
StringIndexer |
setOutputCol(java.lang.String 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.
|
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 StringIndexer(java.lang.String uid)
public StringIndexer()
public static StringIndexer load(java.lang.String path)
public java.lang.String uid()
Identifiable
uid
in interface Identifiable
public StringIndexer setHandleInvalid(java.lang.String value)
public StringIndexer setInputCol(java.lang.String value)
public StringIndexer setOutputCol(java.lang.String value)
public StringIndexerModel fit(DataFrame dataset)
Estimator
fit
in class Estimator<StringIndexerModel>
dataset
- (undocumented)public StructType transformSchema(StructType schema)
PipelineStage
Derives the output schema from the input schema.
transformSchema
in class PipelineStage
schema
- (undocumented)public StringIndexer copy(ParamMap extra)
Params
copy
in interface Params
copy
in class Estimator<StringIndexerModel>
extra
- (undocumented)defaultCopy()
public StructType validateAndTransformSchema(StructType schema)
public Param<java.lang.String> inputCol()
public java.lang.String getInputCol()
public Param<java.lang.String> outputCol()
public java.lang.String getOutputCol()
public Param<java.lang.String> handleInvalid()
public java.lang.String getHandleInvalid()