Package org.apache.spark.ml.regression
Interface LinearRegressionParams
- All Superinterfaces:
HasAggregationDepth
,HasElasticNetParam
,HasFeaturesCol
,HasFitIntercept
,HasLabelCol
,HasLoss
,HasMaxBlockSizeInMB
,HasMaxIter
,HasPredictionCol
,HasRegParam
,HasSolver
,HasStandardization
,HasTol
,HasWeightCol
,Identifiable
,Params
,PredictorParams
,Serializable
- All Known Implementing Classes:
LinearRegression
,LinearRegressionModel
public interface LinearRegressionParams
extends PredictorParams, HasRegParam, HasElasticNetParam, HasMaxIter, HasTol, HasFitIntercept, HasStandardization, HasWeightCol, HasSolver, HasAggregationDepth, HasLoss, HasMaxBlockSizeInMB
Params for linear regression.
-
Method Summary
Modifier and TypeMethodDescriptionepsilon()
The shape parameter to control the amount of robustness.double
loss()
The loss function to be optimized.solver()
The solver algorithm for optimization.validateAndTransformSchema
(StructType schema, boolean fitting, DataType featuresDataType) Validates and transforms the input schema with the provided param map.Methods inherited from interface org.apache.spark.ml.param.shared.HasAggregationDepth
aggregationDepth, getAggregationDepth
Methods inherited from interface org.apache.spark.ml.param.shared.HasElasticNetParam
elasticNetParam, getElasticNetParam
Methods inherited from interface org.apache.spark.ml.param.shared.HasFeaturesCol
featuresCol, getFeaturesCol
Methods inherited from interface org.apache.spark.ml.param.shared.HasFitIntercept
fitIntercept, getFitIntercept
Methods inherited from interface org.apache.spark.ml.param.shared.HasLabelCol
getLabelCol, labelCol
Methods inherited from interface org.apache.spark.ml.param.shared.HasMaxBlockSizeInMB
getMaxBlockSizeInMB, maxBlockSizeInMB
Methods inherited from interface org.apache.spark.ml.param.shared.HasMaxIter
getMaxIter, maxIter
Methods inherited from interface org.apache.spark.ml.param.shared.HasPredictionCol
getPredictionCol, predictionCol
Methods inherited from interface org.apache.spark.ml.param.shared.HasRegParam
getRegParam, regParam
Methods inherited from interface org.apache.spark.ml.param.shared.HasStandardization
getStandardization, standardization
Methods inherited from interface org.apache.spark.ml.param.shared.HasWeightCol
getWeightCol, weightCol
Methods inherited from interface org.apache.spark.ml.util.Identifiable
toString, uid
Methods inherited from interface org.apache.spark.ml.param.Params
clear, copy, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
-
Method Details
-
epsilon
DoubleParam epsilon()The shape parameter to control the amount of robustness. Must be > 1.0. At larger values of epsilon, the huber criterion becomes more similar to least squares regression; for small values of epsilon, the criterion is more similar to L1 regression. Default is 1.35 to get as much robustness as possible while retaining 95% statistical efficiency for normally distributed data. It matches sklearn HuberRegressor and is "M" from A robust hybrid of lasso and ridge regression. Only valid when "loss" is "huber".- Returns:
- (undocumented)
-
getEpsilon
double getEpsilon() -
loss
The loss function to be optimized. Supported options: "squaredError" and "huber". Default: "squaredError" -
solver
The solver algorithm for optimization. Supported options: "l-bfgs", "normal" and "auto". Default: "auto" -
validateAndTransformSchema
StructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType) Description copied from interface:PredictorParams
Validates and transforms the input schema with the provided param map.- Specified by:
validateAndTransformSchema
in interfacePredictorParams
- Parameters:
schema
- input schemafitting
- whether this is in fittingfeaturesDataType
- SQL DataType for FeaturesType. E.g.,VectorUDT
for vector features.- Returns:
- output schema
-