com.eharmony.aloha.models.multilabel
An identifier for the model. Used in score and error reporting.
feature names (parallel to featureFunctions)
feature extracting functions.
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.
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.
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.
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.
transforms a Map[K, Double]
to a B
. Reports successes and errors.
evidence that K
is serializable.
Container for information returned by RegressionFeatures.constructFeatures.
Container for information returned by RegressionFeatures.constructFeatures. Note that as is, this declaration will cause a compiler warning:
"The outer reference in this type test cannot be checked at run time."
This is a known issue and is a scala bug. See: - https://issues.scala-lang.org/browse/SI-4440 - http://stackoverflow.com/questions/16450008/typesafe-swing-events-the-outer-reference-in-this-type-test-cannot-be-checked-a
A solution that would remove the warning is to make the class not final. Not doing this just to remove a warning.
features that were extracted from an input value.
map from feature name to variables in the feature function that were missing.
whether the number of
transforms a Map[K, Double]
to a B
.
transforms a Map[K, Double]
to a B
. Reports successes and errors.
When the predictor
passed to the constructor is a java.io.Closeable, its close
method is called.
When the predictor
passed to the constructor is a java.io.Closeable, its close
method is called.
Extract the features from the raw data by mapping featureFunctions over the input.
Extract the features from the raw data by mapping featureFunctions over the input. If numMissingThreshold is not None and the number of resulting empty Iterables exceeds the numMissingThreshold value, then the resulting Features.missingOk value is false; otherwise, it will be true. If Features.missingOk is false, then go back and check all feature functions for missing values and add findings to the Features.missing map. This Features.missing is a mapping from the feature specification to the list of variable names whose associated values are missing from the input.
raw input data of the model input type.
a Features instance with the following: 1 the transformed input vector 1 the map of bad features to the missing values in the raw data that were needed to compute the feature 1 whether the amount of missing data is acceptable to still continue
feature extracting functions.
feature extracting functions.
feature names (parallel to featureFunctions)
feature names (parallel to featureFunctions)
a sequence of all labels encountered during training.
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.
if provided, a sequence of labels will be extracted from the example for which a prediction is desired.
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.
An identifier for the model.
An identifier for the model. Used in score and error reporting.
if provided, we check whether the threshold is exceeded.
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.
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 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.
A multi-label predictor.
Created by ryan.deak on 8/29/17.
upper bound on model output type
B
type of label or class
input type of the model
output type of the model.
An identifier for the model. Used in score and error reporting.
feature names (parallel to featureFunctions)
feature extracting functions.
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.
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.
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.
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.
transforms a
Map[K, Double]
to aB
. Reports successes and errors.evidence that
K
is serializable.