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.doubleloss()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, getAggregationDepthMethods inherited from interface org.apache.spark.ml.param.shared.HasElasticNetParam
elasticNetParam, getElasticNetParamMethods inherited from interface org.apache.spark.ml.param.shared.HasFeaturesCol
featuresCol, getFeaturesColMethods inherited from interface org.apache.spark.ml.param.shared.HasFitIntercept
fitIntercept, getFitInterceptMethods inherited from interface org.apache.spark.ml.param.shared.HasLabelCol
getLabelCol, labelColMethods inherited from interface org.apache.spark.ml.param.shared.HasMaxBlockSizeInMB
getMaxBlockSizeInMB, maxBlockSizeInMBMethods inherited from interface org.apache.spark.ml.param.shared.HasMaxIter
getMaxIter, maxIterMethods inherited from interface org.apache.spark.ml.param.shared.HasPredictionCol
getPredictionCol, predictionColMethods inherited from interface org.apache.spark.ml.param.shared.HasRegParam
getRegParam, regParamMethods inherited from interface org.apache.spark.ml.param.shared.HasStandardization
getStandardization, standardizationMethods inherited from interface org.apache.spark.ml.param.shared.HasWeightCol
getWeightCol, weightColMethods inherited from interface org.apache.spark.ml.util.Identifiable
toString, uidMethods inherited from interface org.apache.spark.ml.param.Params
clear, copy, copyValues, defaultCopy, defaultParamMap, estimateMatadataSize, 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:PredictorParamsValidates and transforms the input schema with the provided param map.- Specified by:
validateAndTransformSchemain interfacePredictorParams- Parameters:
schema- input schemafitting- whether this is in fittingfeaturesDataType- SQL DataType for FeaturesType. E.g.,VectorUDTfor vector features.- Returns:
- output schema
-