org.apache.spark.ml.classification
Class Classifier<FeaturesType,E extends Classifier<FeaturesType,E,M>,M extends ClassificationModel<FeaturesType,M>>
Object
org.apache.spark.ml.PipelineStage
org.apache.spark.ml.Estimator<M>
org.apache.spark.ml.Predictor<FeaturesType,E,M>
org.apache.spark.ml.classification.Classifier<FeaturesType,E,M>
- All Implemented Interfaces:
- java.io.Serializable, Logging, Params
- Direct Known Subclasses:
- LogisticRegression
public abstract class Classifier<FeaturesType,E extends Classifier<FeaturesType,E,M>,M extends ClassificationModel<FeaturesType,M>>
- extends Predictor<FeaturesType,E,M>
:: DeveloperApi ::
Single-label binary or multiclass classification.
Classes are indexed {0, 1, ..., numClasses - 1}.
- 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.ml.param.Params |
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, setDefault, shouldOwn, validateParams |
Methods inherited from interface org.apache.spark.Logging |
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning |
Classifier
public Classifier()
setRawPredictionCol
public E setRawPredictionCol(String value)
validateAndTransformSchema
public StructType validateAndTransformSchema(StructType schema,
boolean fitting,
DataType featuresDataType)
validateAndTransformSchema
public StructType validateAndTransformSchema(StructType schema,
boolean fitting,
DataType featuresDataType)
- Validates and transforms the input schema with the provided param map.
- Parameters:
schema
- input schemafitting
- whether this is in fittingfeaturesDataType
- SQL DataType for FeaturesType.
E.g., VectorUDT
for vector features.
- Returns:
- output schema