org.apache.spark.ml.classification
Class Classifier<FeaturesType,E extends Classifier<FeaturesType,E,M>,M extends ClassificationModel<FeaturesType,M>>

Object
  extended by org.apache.spark.ml.PipelineStage
      extended by org.apache.spark.ml.Estimator<M>
          extended by org.apache.spark.ml.Predictor<FeaturesType,E,M>
              extended by 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

Constructor Summary
Classifier()
           
 
Method Summary
 E setRawPredictionCol(String value)
           
 StructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType)
           
 StructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType)
          Validates and transforms the input schema with the provided param map.
 
Methods inherited from class org.apache.spark.ml.Predictor
copy, fit, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema
 
Methods inherited from class org.apache.spark.ml.Estimator
fit, fit, fit, fit
 
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
 

Constructor Detail

Classifier

public Classifier()
Method Detail

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 schema
fitting - whether this is in fitting
featuresDataType - SQL DataType for FeaturesType. E.g., VectorUDT for vector features.
Returns:
output schema