io.prediction.controller

PAlgorithm

abstract class PAlgorithm[PD, M, Q, P] extends BaseAlgorithm[PD, M, Q, P]

Base class of a parallel algorithm.

A parallel algorithm can be run in parallel on a cluster and produces a model that can also be distributed across a cluster.

PD

Prepared data class.

M

Trained model class.

Q

Input query class.

P

Output prediction class.

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

Instance Constructors

  1. new PAlgorithm()(implicit arg0: 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.

  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, indexedQueries: RDD[(Long, Q)]): RDD[(Long, P)]

    Implement this method to produce predictions from batch queries.

    Implement this method to produce predictions from batch queries.

    Evaluation call this method. Since in PAlgorithm, M may contain RDDs, it is impossible to call predict(model, query) without localizing queries (which is very inefficient). Hence, engine builders using PAlgorithm need to implement this method for evaluation purpose.

    model

    Trained model produced by train.

    indexedQueries

    Batch of queries with indices.

    returns

    An RDD of indexed predictions.

  8. def batchPredictBase(baseModel: Any, indexedQueries: RDD[(Long, Q)]): RDD[(Long, P)]

    Do not use directly or override this method, as this is called by PredictionIO workflow to perform batch prediction.

    Do not use directly or override this method, as this is called by PredictionIO workflow to perform batch prediction.

    Definition Classes
    PAlgorithmBaseAlgorithm
  9. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

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

    Definition Classes
    Any
  16. def isJava: Boolean

    Definition Classes
    PAlgorithmBaseAlgorithm
  17. def isParallel: Boolean

    Definition Classes
    PAlgorithmBaseAlgorithm
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  21. def predictBase(baseModel: Any, query: Q): P

    Do not use directly or override this method, as this is called by PredictionIO workflow to perform prediction.

    Do not use directly or override this method, as this is called by PredictionIO workflow to perform prediction.

    Definition Classes
    PAlgorithmBaseAlgorithm
  22. def queryManifest(): Manifest[Q]

    Definition Classes
    BaseAlgorithm
  23. lazy val querySerializer: Formats

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

    Definition Classes
    AnyRef
  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. def trainBase(sc: SparkContext, pd: PD): 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.

    Definition Classes
    PAlgorithmBaseAlgorithm
  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 BaseAlgorithm[PD, M, Q, P]

Inherited from WithBaseQuerySerializer

Inherited from AbstractDoer

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped