A model representing a categorical distribution.
A model that swallows exceptions thrown by submodel.
A model that swallows exceptions thrown by submodel.
When exceptions are thrown by submodel, then a score containing a ScoreError should be produces where the error list should be either:
when recordErrorStackTraces and the stack trace and message could be retrieved; otherwise, the error list should be:
If the exception that is caught is a com.eharmony.aloha.semantics.SemanticsUdfException, then 3 additional fields are added to the end of the errors list in indices 3, 4, 5:
model input type
model output type
the submodel to which the score calculations are delegated.
whether stack traces should be recorded.
Created by ryan on 1/11/17.
A model that runs the subModel and returns the label associated with the segment in which the inner model's score falls.
A model that runs the subModel and returns the label associated with the segment in which the inner model's score falls. This is done via a linear scan of the thresholds.
upper type bound for output of model and all submodels.
submodel's natural type
segmentation model's natural type
the model input type
the model's ultimate output type
a model identifier
a sub model
a sequence of ordered thresholds against which
a set of labesl to use
an implicit ordering
Created by ryan on 1/18/17.
Created by ryan on 1/18/17.
Created by ryan on 1/18/17.
Provides over 200 coercions between types.
Provides over 200 coercions between types. This works for the following matrix of types:
TO Bo C By Sh I L F D JBy JSh JI JL JF JD JC JBo St +-------------------------------------------------------------------- Bo | I bB tS C | I A A A A A A A A A A A A A tS By | A I A A A A A A A A A A A A tS Sh | A A I A A A A A A A A A A A tS I | A A A I A A A A A A A A A A tS L | A A A A I A A A A A A A A A tS F F | A A A A A I A A A A A A A A tS R D | A A A A A A I A A A A A A A tS O JBy | N N N N N N N I N N N N N N tS M JSh | N N N N N N N N I N N N N N tS JI | N N N N N N N N N I N N N N tS JL | N N N N N N N N N N I N N N tS JF | N N N N N N N N N N N I N N tS JD | N N N N N N N N N N N N I N tS JC | uC I tS JBo | uB I tS St | I
Where the label abbreviations are:
and value abbreviations are:
The rationale behind not supplying coercion from Strings is that too many exceptions can be thrown during the coercion process. Coercions from String to character have issues with the empty string. One could call one of the following but they all throw exceptions:
"".charAt(0) // java.lang.StringIndexOutOfBoundsException: String index out of range: 0 "".apply(0) // java.lang.StringIndexOutOfBoundsException: String index out of range: 0 "".head // java.util.NoSuchElementException: next on empty iterator
Conversion to Boolean from Numbers and vice versa is not supported because there are a number of ways to do this:
Created by ryan.deak on 8/31/17.
A model representing a categorical distribution. This will return values with the probabilities prescribed by the distribution parameter. For information on categorical distributions, check out Wikipedia's page.
model input type
model output type
An id with which to identify this model
features whose values are fed to the distribution. These features are functions of the input.
A distribution parametrized by a sequence of probabilities, that takes a sequence of values and produces a hash that is used as the randomness with which to choose one of the labels.
the values that can returned by this model (with the probabilities described by the distribution)
Whether to allow missing data defaults to false). When this is set to false and missing data ( scala.None) is produced by one of the features, the model will result in an error.