org.apache.spark.ml.regression

LinearRegressionModel

class LinearRegressionModel extends RegressionModel[Vector, LinearRegressionModel] with LinearRegressionParams

:: AlphaComponent ::

Model produced by LinearRegression.

Annotations
@AlphaComponent()
Linear Supertypes
LinearRegressionParams, HasMaxIter, HasRegParam, RegressionModel[Vector, LinearRegressionModel], RegressorParams, PredictionModel[Vector, LinearRegressionModel], PredictorParams, HasPredictionCol, HasFeaturesCol, HasLabelCol, Model[LinearRegressionModel], Transformer, Params, Identifiable, PipelineStage, Logging, Serializable, Serializable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By inheritance
Inherited
  1. LinearRegressionModel
  2. LinearRegressionParams
  3. HasMaxIter
  4. HasRegParam
  5. RegressionModel
  6. RegressorParams
  7. PredictionModel
  8. PredictorParams
  9. HasPredictionCol
  10. HasFeaturesCol
  11. HasLabelCol
  12. Model
  13. Transformer
  14. Params
  15. Identifiable
  16. PipelineStage
  17. Logging
  18. Serializable
  19. Serializable
  20. AnyRef
  21. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addOutputColumn(schema: StructType, colName: String, dataType: DataType): StructType

    Attributes
    protected
    Definition Classes
    Params
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def checkInputColumn(schema: StructType, colName: String, dataType: DataType): Unit

    Check whether the given schema contains an input column.

    Check whether the given schema contains an input column.

    colName

    Parameter name for the input column.

    dataType

    SQL DataType of the input column.

    Attributes
    protected
    Definition Classes
    Params
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def copy(): LinearRegressionModel

    Create a copy of the model.

    Create a copy of the model. The copy is shallow, except for the embedded paramMap, which gets a deep copy.

    Attributes
    protected
    Definition Classes
    LinearRegressionModel → PredictionModel
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def explainParams(): String

    Returns the documentation of all params.

    Returns the documentation of all params.

    Definition Classes
    Params
  14. val featuresCol: Param[String]

    param for features column name

    param for features column name

    Definition Classes
    HasFeaturesCol
  15. def featuresDataType: DataType

    :: 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.

    Attributes
    protected
    Definition Classes
    PredictionModel
    Annotations
    @DeveloperApi()
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. val fittingParamMap: ParamMap

    Fitting parameters, such that parent.

    Fitting parameters, such that parent.fit(..., fittingParamMap) could reproduce the model.

    Definition Classes
    LinearRegressionModelModel
  18. def get[T](param: Param[T]): T

    Gets the value of a parameter in the embedded param map.

    Gets the value of a parameter in the embedded param map.

    Attributes
    protected
    Definition Classes
    Params
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  21. def getLabelCol: String

    Definition Classes
    HasLabelCol
  22. def getMaxIter: Int

    Definition Classes
    HasMaxIter
  23. def getPredictionCol: String

    Definition Classes
    HasPredictionCol
  24. def getRegParam: Double

    Definition Classes
    HasRegParam
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. val intercept: Double

  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def isSet(param: Param[_]): Boolean

    Checks whether a param is explicitly set.

    Checks whether a param is explicitly set.

    Definition Classes
    Params
  29. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  30. val labelCol: Param[String]

    param for label column name

    param for label column name

    Definition Classes
    HasLabelCol
  31. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  32. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  33. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  34. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  35. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  36. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  37. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  38. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  39. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  40. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  41. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  42. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  43. val maxIter: IntParam

    param for max number of iterations

    param for max number of iterations

    Definition Classes
    HasMaxIter
  44. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  45. final def notify(): Unit

    Definition Classes
    AnyRef
  46. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  47. val paramMap: ParamMap

    Internal param map.

    Internal param map.

    Attributes
    protected
    Definition Classes
    Params
  48. def params: Array[Param[_]]

    Returns all params.

    Returns all params.

    Definition Classes
    Params
  49. val parent: LinearRegression

    The parent estimator that produced this model.

    The parent estimator that produced this model.

    Definition Classes
    LinearRegressionModelModel
  50. def predict(features: Vector): Double

    :: DeveloperApi ::

    :: DeveloperApi ::

    Predict real-valued label for the given features. This internal method is used to implement transform() and output predictionCol.

    Attributes
    protected
    Definition Classes
    LinearRegressionModel → RegressionModel → PredictionModel
  51. val predictionCol: Param[String]

    param for prediction column name

    param for prediction column name

    Definition Classes
    HasPredictionCol
  52. val regParam: DoubleParam

    param for regularization parameter

    param for regularization parameter

    Definition Classes
    HasRegParam
  53. def set[T](param: Param[T], value: T): LinearRegressionModel.this.type

    Sets a parameter in the embedded param map.

    Sets a parameter in the embedded param map.

    Attributes
    protected
    Definition Classes
    Params
  54. def setFeaturesCol(value: String): LinearRegressionModel

    Definition Classes
    PredictionModel
  55. def setPredictionCol(value: String): LinearRegressionModel

    Definition Classes
    PredictionModel
  56. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  57. def toString(): String

    Definition Classes
    AnyRef → Any
  58. def transform(dataset: DataFrame, paramMap: ParamMap): DataFrame

    Transforms dataset by reading from featuresCol, calling predict(), and storing the predictions as a new column predictionCol.

    Transforms dataset by reading from featuresCol, calling predict(), and storing the predictions as a new column predictionCol.

    dataset

    input dataset

    paramMap

    additional parameters, overwrite embedded params

    returns

    transformed dataset with predictionCol of type Double

    Definition Classes
    PredictionModel → Transformer
  59. def transform(dataset: DataFrame, paramPairs: ParamPair[_]*): DataFrame

    Transforms the dataset with optional parameters

    Transforms the dataset with optional parameters

    dataset

    input dataset

    paramPairs

    optional list of param pairs, overwrite embedded params

    returns

    transformed dataset

    Definition Classes
    Transformer
    Annotations
    @varargs()
  60. def transformSchema(schema: StructType, paramMap: ParamMap): StructType

    :: DeveloperAPI ::

    :: DeveloperAPI ::

    Derives the output schema from the input schema and parameters. The schema describes the columns and types of the data.

    schema

    Input schema to this stage

    paramMap

    Parameters passed to this stage

    returns

    Output schema from this stage

    Definition Classes
    PredictionModel → PipelineStage
  61. def transformSchema(schema: StructType, paramMap: ParamMap, logging: Boolean): StructType

    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.

    Attributes
    protected
    Definition Classes
    PipelineStage
  62. def validate(): Unit

    Validates parameter values stored internally.

    Validates parameter values stored internally. Raise an exception if any parameter value is invalid.

    Definition Classes
    Params
  63. def validate(paramMap: ParamMap): Unit

    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.

    Definition Classes
    Params
  64. def validateAndTransformSchema(schema: StructType, paramMap: ParamMap, fitting: Boolean, featuresDataType: DataType): StructType

    Validates and transforms the input schema with the provided param map.

    Validates and transforms the input schema with the provided param map.

    schema

    input schema

    paramMap

    additional parameters

    fitting

    whether this is in fitting

    featuresDataType

    SQL DataType for FeaturesType. E.g., org.apache.spark.mllib.linalg.VectorUDT for vector features.

    returns

    output schema

    Attributes
    protected
    Definition Classes
    PredictorParams
  65. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. val weights: Vector

Inherited from LinearRegressionParams

Inherited from HasMaxIter

Inherited from HasRegParam

Inherited from RegressionModel[Vector, LinearRegressionModel]

Inherited from RegressorParams

Inherited from PredictionModel[Vector, LinearRegressionModel]

Inherited from PredictorParams

Inherited from HasPredictionCol

Inherited from HasFeaturesCol

Inherited from HasLabelCol

Inherited from Model[LinearRegressionModel]

Inherited from Transformer

Inherited from Params

Inherited from Identifiable

Inherited from PipelineStage

Inherited from Logging

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Parameters

A list of (hyper-)parameter keys this algorithm can take. Users can set and get the parameter values through setters and getters, respectively.

Members

Parameter setters

Parameter getters