Package

com.eharmony.aloha.models

multilabel

Permalink

package multilabel

Created by ryan.deak on 8/31/17.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. multilabel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class MultilabelModel[U, K, -A, +B <: U](modelId: ModelIdentity, featureNames: IndexedSeq[String], featureFunctions: IndexedSeq[GenAggFunc[A, Sparse]], labelsInTrainingSet: IndexedSeq[K], labelsOfInterest: Option[GenAggFunc[A, IndexedSeq[K]]], predictorProducer: SparsePredictorProducer[K], numMissingThreshold: Option[Int], auditor: Auditor[U, Map[K, Double], B])(implicit ev: SerializabilityEvidence[K]) extends SubmodelBase[U, Map[K, Double], A, B] with RegressionFeatures[A] with Product with Serializable

    Permalink

    A multi-label predictor.

    A multi-label predictor.

    Created by ryan.deak on 8/29/17.

    U

    upper bound on model output type B

    K

    type of label or class

    A

    input type of the model

    B

    output type of the model.

    modelId

    An identifier for the model. Used in score and error reporting.

    featureNames

    feature names (parallel to featureFunctions)

    featureFunctions

    feature extracting functions.

    labelsInTrainingSet

    a sequence of all labels encountered during training. Note: the order of labels may relate to the predictor produced by predictorProducer. It is the caller's responsibility to ensure the order is correct. To mitigate such problems, both labels and indices into labelsInTrainingSet are passed to the predictor produced by predictorProducer.

    labelsOfInterest

    if provided, a sequence of labels will be extracted from the example for which a prediction is desired. The intersection of the extracted labels and the training labels will be the labels for which predictions will be produced.

    predictorProducer

    the function produced when calling this function is responsible for getting the data into the correct type and using it within an underlying ML library to produce a prediction. The mapping back to (K, Double) pairs is also its responsibility. If the predictor produced by predictorProducer is Closeable, it will be closed when MultilabelModel's close method is called.

    numMissingThreshold

    if provided, we check whether the threshold is exceeded. If so, return an error instead of the computed score. This is for missing data situations.

    auditor

    transforms a Map[K, Double] to a B. Reports successes and errors.

    ev

    evidence that K is serializable.

  2. trait MultilabelModelParserPlugin extends AnyRef

    Permalink

    A plugin that will ultimately produce the SparseMultiLabelPredictor.

    A plugin that will ultimately produce the SparseMultiLabelPredictor. Created by ryan.deak on 9/6/17.

  3. trait MultilabelPluginProviderCompanion extends AnyRef

    Permalink

    Created by ryan.deak on 9/6/17.

  4. trait PluginInfo[K] extends AnyRef

    Permalink

    Created by ryan.deak on 9/7/17.

  5. type SparseMultiLabelPredictor[K] = (SparseFeatures, Labels[K], LabelIndices, SparseLabelDepFeatures) ⇒ Try[Map[K, Double]]

    Permalink

    A sparse multi-label predictor takes:

    A sparse multi-label predictor takes:

    • features
    • labels for which a prediction should be produced
    • indices of those labels into sequence of all of the labels the model knows about.
    • label dependent-features

    and returns a Map from the labels passed in, to the prediction associated with the label.

  6. type SparsePredictorProducer[K] = () ⇒ SparseMultiLabelPredictor[K]

    Permalink

    A lazy version of a sparse multi-label predictor.

    A lazy version of a sparse multi-label predictor. It is a curried zero-arg function that produces a sparse multi-label predictor.

    This definition is "lazy" because we can't guarantee that the underlying predictor is Serializable so we pass around a function that can be cached in a transient lazy val. This function should however be Serializable and testing should be done to ensure that each predictor producer is Serializable.

Value Members

  1. object MultilabelModel extends ParserProviderCompanion with Serializable

    Permalink
  2. object MultilabelModelParserPlugin extends RuntimeClasspathScanning

    Permalink
  3. package json

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped