com.alpine.model.pack.ml

LinearRegressionModel

case class LinearRegressionModel(coefficients: Seq[Double], inputFeatures: Seq[ColumnDef], intercept: Double = 0, dependentFeatureName: String = "", identifier: String = "") extends RegressionRowModel with Product with Serializable

Representation of the classical linear regression model y = intercept + a_0 x_0 + a_1 x_1 + ... + a_n x_n.

The length of the coefficients must match the length of the inputFeatures.

We use java.lang.Double for the type of the coefficients, because the scala Double type information is lost by scala/Gson and the deserialization fails badly for edge cases (e.g. Double.NaN).

coefficients

Vector of coefficients of the model. Must match the length of inputFeatures.

inputFeatures

Description of the (numeric) input features. Must match the length of coefficients.

intercept

Intercept of the model (defaults to 0).

dependentFeatureName

Name used to identify the dependent feature in an evaluation dataset.

identifier

Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

Linear Supertypes
Product, Equals, RegressionRowModel, RowModel, MLModel, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LinearRegressionModel
  2. Product
  3. Equals
  4. RegressionRowModel
  5. RowModel
  6. MLModel
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LinearRegressionModel(coefficients: Seq[Double], inputFeatures: Seq[ColumnDef], intercept: Double = 0, dependentFeatureName: String = "", identifier: String = "")

    coefficients

    Vector of coefficients of the model. Must match the length of inputFeatures.

    inputFeatures

    Description of the (numeric) input features. Must match the length of coefficients.

    intercept

    Intercept of the model (defaults to 0).

    dependentFeatureName

    Name used to identify the dependent feature in an evaluation dataset.

    identifier

    Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def classesForLoading: Set[Class[_]]

    This should return a representative class from every jar that is needed to load the object during deserialization.

    This should return a representative class from every jar that is needed to load the object during deserialization.

    Default implementation returns the class of MLModel, and the class of the model implementation.

    Definition Classes
    MLModel
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val coefficients: Seq[Double]

    Vector of coefficients of the model.

    Vector of coefficients of the model. Must match the length of inputFeatures.

  10. def dependentFeature: ColumnDef

    Used when we are doing model quality evaluation e.

    Used when we are doing model quality evaluation e.g. Confusion Matrix, so we know what feature in the test dataset to compare the result to.

    returns

    Feature description used to identify the dependent feature in an evaluation dataset.

    Definition Classes
    LinearRegressionModelRegressionRowModel
  11. val dependentFeatureName: String

    Name used to identify the dependent feature in an evaluation dataset.

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. val identifier: String

    Used to identify this model when in a collection of models.

    Used to identify this model when in a collection of models. Should be simple characters, so it can be used in a feature name.

    Definition Classes
    LinearRegressionModelRowModel
  16. val inputFeatures: Seq[ColumnDef]

    Description of the (numeric) input features.

    Description of the (numeric) input features. Must match the length of coefficients.

    Definition Classes
    LinearRegressionModelRowModel
  17. val intercept: Double

    Intercept of the model (defaults to 0).

  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  22. def outputFeatures: Seq[ColumnDef]

    Definition Classes
    RegressionRowModelRowModel
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def transformationSchema: DetailedTransformationSchema

    Definition Classes
    RowModel
  25. def transformer: LinearRegressionTransformer

  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from RegressionRowModel

Inherited from RowModel

Inherited from MLModel

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped