org.apache.spark.ml.classification
Check whether the given schema contains an input column.
Check whether the given schema contains an input column.
Parameter name for the input column.
SQL DataType of the input column.
Returns the documentation of all params.
Returns the documentation of all params.
Extract labelCol and featuresCol from the given dataset, and put it in an RDD with strong types.
Extract labelCol and featuresCol from the given dataset, and put it in an RDD with strong types.
param for features column name
param for features column name
:: DeveloperApi ::
:: DeveloperApi ::
Returns the SQL DataType corresponding to the FeaturesType type parameter.
This is used by validateAndTransformSchema(). This workaround is needed since SQL has different APIs for Scala and Java.
The default value is VectorUDT, but it may be overridden if FeaturesType is not Vector.
Fits a single model to the input data with provided parameter map.
Fits a single model to the input data with provided parameter map.
input dataset
Parameter map. These values override any specified in this Estimator's embedded ParamMap.
fitted model
Fits multiple models to the input data with multiple sets of parameters.
Fits multiple models to the input data with multiple sets of parameters. The default implementation uses a for loop on each parameter map. Subclasses could overwrite this to optimize multi-model training.
input dataset
An array of parameter maps. These values override any specified in this Estimator's embedded ParamMap.
fitted models, matching the input parameter maps
Fits a single model to the input data with optional parameters.
Fits a single model to the input data with optional parameters.
input dataset
Optional list of param pairs. These values override any specified in this Estimator's embedded ParamMap.
fitted model
Gets the value of a parameter in the embedded param map.
Gets the value of a parameter in the embedded param map.
Checks whether a param is explicitly set.
Checks whether a param is explicitly set.
param for label column name
param for label column name
param for max number of iterations
param for max number of iterations
Internal param map.
Internal param map.
Returns all params.
Returns all params.
param for prediction column name
param for prediction column name
param for predicted class conditional probabilities column name
param for predicted class conditional probabilities column name
param for raw prediction column name
param for raw prediction column name
param for regularization parameter
param for regularization parameter
Sets a parameter in the embedded param map.
Sets a parameter in the embedded param map.
param for threshold in (binary) prediction
param for threshold in (binary) prediction
:: DeveloperApi ::
:: DeveloperApi ::
Train a model using the given dataset and parameters. Developers can implement this instead of fit() to avoid dealing with schema validation and copying parameters into the model.
Training dataset
Parameter map. Unlike fit()'s paramMap, this paramMap has already been combined with the embedded ParamMap.
Fitted model
:: DeveloperApi ::
:: DeveloperApi ::
Derives the output schema from the input schema and parameters. The schema describes the columns and types of the data.
Input schema to this stage
Parameters passed to this stage
Output schema from this stage
Derives the output schema from the input schema and parameters, optionally with logging.
Derives the output schema from the input schema and parameters, optionally with logging.
Validates parameter values stored internally.
Validates parameter values stored internally. Raise an exception if any parameter value is invalid.
Validates parameter values stored internally plus the input parameter map.
Validates parameter values stored internally plus the input parameter map. Raises an exception if any parameter is invalid.
Validates and transforms the input schema with the provided param map.
Validates and transforms the input schema with the provided param map.
input schema
additional parameters
whether this is in fitting
SQL DataType for FeaturesType. E.g., org.apache.spark.mllib.linalg.VectorUDT for vector features.
output schema
A list of (hyper-)parameter keys this algorithm can take. Users can set and get the parameter values through setters and getters, respectively.
:: AlphaComponent ::
Logistic regression. Currently, this class only supports binary classification.