com.alpine.model.pack.preprocess

PolynomialModel

case class PolynomialModel(exponents: Seq[Seq[Double]], inputFeatures: Seq[ColumnDef], identifier: String = "") extends RowModel with PFAConvertible with Product with Serializable

Model that creates output features that are polynomial combinations of the input features.

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

If the exponents are a matrix

[[1,2,0], [0.5,3,2]]

Then the transformation of a row (x1, x2, x3) will be

(y1, y2) = (x1 * x2 pow 2, sqrt(x1) * x2 pow 3 * x3 pow 2).
Annotations
@SerialVersionUID( 6759725743006372988L )
Linear Supertypes
Product, Equals, PFAConvertible, RowModel, MLModel, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PolynomialModel
  2. Product
  3. Equals
  4. PFAConvertible
  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 PolynomialModel(exponents: Seq[Seq[Double]], inputFeatures: Seq[ColumnDef], identifier: String = "")

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. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. val exponents: Seq[Seq[Double]]

  11. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  13. def getPFAConverter: PFAConverter

    Definition Classes
    PolynomialModelPFAConvertible
  14. 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.

    returns

    identifier for the model.

    Definition Classes
    PolynomialModelRowModel
  15. val inputFeatures: Seq[ColumnDef]

    Definition Classes
    PolynomialModelRowModel
  16. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  20. def outputFeatures: IndexedSeq[ColumnDef]

    Definition Classes
    PolynomialModelRowModel
  21. def sqlOutputFeatures: Seq[ColumnDef]

    Definition Classes
    RowModel
  22. def sqlTransformer(sqlGenerator: SQLGenerator): Option[SQLTransformer]

    Definition Classes
    PolynomialModelRowModel
  23. def streamline(requiredOutputFeatureNames: Seq[String]): RowModel

    Returns a streamlined version of this model, throwing away parts which are not required to produce the features with names in requiredOutputFeatureNames.

    Returns a streamlined version of this model, throwing away parts which are not required to produce the features with names in requiredOutputFeatureNames.

    Behaviour is undefined if requiredOutputFeatureNames is not actually a subset of outputFeatures.map(_columnName).

    The resulting model may still have more output features than those required (i.e. for ClassificationRowModel implementations which always have the same output features, or for OneHotEncodingModel whose output features naturally group together).

    requiredOutputFeatureNames

    names of the output features that the new model should produce.

    returns

    A model which has the same functionality for those output features listed, but potentially fewer input features.

    Definition Classes
    PolynomialModelRowModel
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. def transformationSchema: DetailedTransformationSchema

    Definition Classes
    RowModel
  26. def transformer: Transformer

    Definition Classes
    PolynomialModelRowModel
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Product

Inherited from Equals

Inherited from PFAConvertible

Inherited from RowModel

Inherited from MLModel

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped