Package org.apache.spark.ml.regression
Class LinearRegressionModel
Object
org.apache.spark.ml.PipelineStage
org.apache.spark.ml.Transformer
org.apache.spark.ml.Model<M>
org.apache.spark.ml.PredictionModel<FeaturesType,M>
org.apache.spark.ml.regression.RegressionModel<Vector,LinearRegressionModel>
org.apache.spark.ml.regression.LinearRegressionModel
- All Implemented Interfaces:
Serializable,org.apache.spark.internal.Logging,Params,HasAggregationDepth,HasElasticNetParam,HasFeaturesCol,HasFitIntercept,HasLabelCol,HasLoss,HasMaxBlockSizeInMB,HasMaxIter,HasPredictionCol,HasRegParam,HasSolver,HasStandardization,HasTol,HasWeightCol,PredictorParams,LinearRegressionParams,GeneralMLWritable,HasTrainingSummary<LinearRegressionTrainingSummary>,Identifiable,MLWritable
public class LinearRegressionModel
extends RegressionModel<Vector,LinearRegressionModel>
implements LinearRegressionParams, GeneralMLWritable, HasTrainingSummary<LinearRegressionTrainingSummary>
Model produced by
LinearRegression.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging
org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter -
Method Summary
Modifier and TypeMethodDescriptionfinal IntParamParam for suggested depth for treeAggregate (>= 2).Creates a copy of this instance with the same UID and some extra params.final DoubleParamParam for the ElasticNet mixing parameter, in range [0, 1].final DoubleParamepsilon()The shape parameter to control the amount of robustness.Evaluates the model on a test dataset.final BooleanParamParam for whether to fit an intercept term.doublestatic LinearRegressionModelloss()The loss function to be optimized.final DoubleParamParam for Maximum memory in MB for stacking input data into blocks.final IntParammaxIter()Param for maximum number of iterations (>= 0).intReturns the number of features the model was trained on.doublePredict label for the given features.static MLReader<LinearRegressionModel>read()final DoubleParamregParam()Param for regularization parameter (>= 0).doublescale()solver()The solver algorithm for optimization.final BooleanParamParam for whether to standardize the training features before fitting the model.summary()Gets summary (e.g.final DoubleParamtol()Param for the convergence tolerance for iterative algorithms (>= 0).toString()uid()An immutable unique ID for the object and its derivatives.Param for weight column name.write()Returns aGeneralMLWriterinstance for this ML instance.Methods inherited from class org.apache.spark.ml.PredictionModel
featuresCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol, transform, transformSchemaMethods inherited from class org.apache.spark.ml.Transformer
transform, transform, transformMethods inherited from class org.apache.spark.ml.PipelineStage
paramsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.spark.ml.param.shared.HasAggregationDepth
getAggregationDepthMethods inherited from interface org.apache.spark.ml.param.shared.HasElasticNetParam
getElasticNetParamMethods inherited from interface org.apache.spark.ml.param.shared.HasFeaturesCol
featuresCol, getFeaturesColMethods inherited from interface org.apache.spark.ml.param.shared.HasFitIntercept
getFitInterceptMethods inherited from interface org.apache.spark.ml.param.shared.HasLabelCol
getLabelCol,