io.prediction.controller

P2LAlgorithm

abstract class P2LAlgorithm[PD, M, Q, P] extends BaseAlgorithm[PD, RDD[M], Q, P] with LModelAlgorithm[M, Q, P]

Base class of a parallel-to-local algorithm.

A parallel-to-local algorithm can be run in parallel on a cluster and produces a model that can fit within a single machine.

PD

Prepared data class.

M

Trained model class.

Q

Input query class.

P

Output prediction class.

Linear Supertypes
LModelAlgorithm[M, Q, P], BaseAlgorithm[PD, RDD[M], Q, P], WithBaseQuerySerializer, AbstractDoer, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. P2LAlgorithm
  2. LModelAlgorithm
  3. BaseAlgorithm
  4. WithBaseQuerySerializer
  5. AbstractDoer
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new P2LAlgorithm()(implicit arg0: ClassTag[M], arg1: Manifest[Q])

Abstract Value Members

  1. abstract def predict(model: M, query: Q): P

    Implement this method to produce a prediction from a query and trained model.

    Implement this method to produce a prediction from a query and trained model.

    model

    Trained model produced by train.

    query

    An input query.

    returns

    A prediction.

    Definition Classes
    P2LAlgorithmLModelAlgorithm
  2. abstract def train(pd: PD): M

    Implement this method to produce a model from prepared data.

    Implement this method to produce a model from prepared data.

    pd

    Prepared data for model training.

    returns

    Trained model.

Concrete 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 batchPredict(model: M, queries: Iterator[(Long, Q)]): Iterator[(Long, P)]

    Definition Classes
    LModelAlgorithm
  8. def batchPredictBase(baseModel: Any, baseQueries: RDD[(Long, Q)]): RDD[(Long, P)]

    Definition Classes
    LModelAlgorithm
  9. def batchPredictWrapper(model: Iterator[M], queries: Iterator[(Long, Q)]): Iterator[(Long, P)]

    Definition Classes
    LModelAlgorithm
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  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. def getModel(baseModel: Any): RDD[Any]

    Definition Classes
    LModelAlgorithm
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def isJava: Boolean

    Definition Classes
    P2LAlgorithmBaseAlgorithm
  19. def isParallel: Boolean

    Definition Classes
    P2LAlgorithmBaseAlgorithm
  20. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  23. def predictBase(localBaseModel: Any, query: Q): P

    Definition Classes
    LModelAlgorithm
  24. def queryManifest(): Manifest[Q]

    Definition Classes
    BaseAlgorithm
  25. lazy val querySerializer: Formats

    Definition Classes
    WithBaseQuerySerializer
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    AnyRef → Any
  28. def trainBase(sc: SparkContext, pd: PD): RDD[M]

    Do not use directly or override this method, as this is called by PredictionIO workflow to train a model.

    Do not use directly or override this method, as this is called by PredictionIO workflow to train a model.

    Developer note: In train: PD => M, M is a local object. We have to parallelize it.

    Definition Classes
    P2LAlgorithmBaseAlgorithm
  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LModelAlgorithm[M, Q, P]

Inherited from BaseAlgorithm[PD, RDD[M], Q, P]

Inherited from WithBaseQuerySerializer

Inherited from AbstractDoer

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped