A decision tree whose node values are the values returned by this model.
A decision tree whose node values are the values returned by this model.
model input type
model output type
An id with which to identify this model
the root node of the decision tree
if no path from the root to a leaf can be generated for a given input, should we return a score associated with an interior node?
Either of Non-empty Seq (Like poor man's version of ValidationNel from scalaz)
Either of Non-empty Seq (Like poor man's version of ValidationNel from scalaz)
Representation of a decision tree leaf node.
Representation of a decision tree leaf node.
the domain of the childSelector function
a value stored in this leaf node.
A linear time node selection algorithm that is based on applying the predicates in order to the input datum and selecting the first node whose associated predicate succeeds.
A linear time node selection algorithm that is based on applying the predicates in order to the input datum and selecting the first node whose associated predicate succeeds. If no predicate succeeds, return an error.
input type
The number of predicates must equal the number of nodes
A decision tree containing models at the nodes.
A decision tree containing models at the nodes. The evaluation algorithm works as follows:
If a
The benefit to this is that we report which submodel was responsible for producing the score.
model input type
model output type
An id with which to identify this model
the root node of the decision tree
if no path from the root to a leaf can be generated for a given input, should we return a score associated with an interior node?
A simple representation of a decision tree node.
A simple representation of a decision tree node. It is just like a com.eharmony.aloha.models.tree.Tree except that it has a way of choosing a descendant, given an input.
the type of node in the decision tree.
the domain of the childSelector function
A selector that random selects a child node.
A selector that random selects a child node.
the input type from which features are extracted.
features on which the hash is based. Notice that function output type is Any.
a distribution used for selecting values.
whether it is OK to hash on missing data. Keep in mind that if set to true, there is no guarantee about what value will be selected. (Missing data in this context means None. There are no explicit null checks; just None checks.)
Provides factory methods for creating Decision Tree nodes.
Like l.map(f).sequence[({type L[+A] = Either[Seq[String], A]})#L, C ] in scalaz except that it short circuits if it finds an error.
Like l.map(f).sequence[({type L[+A] = Either[Seq[String], A]})#L, C ] in scalaz except that it short circuits if it finds an error. (There must be some better way to do this w/ scalaz).
If we put a println("folding") at the top of the inner function h, we would get the following:
scala> mapSeq(Left(Seq("1")) +: (2 to 3).map(Right(_)))(identity) // Only 1 "folding" instead of 3. folding res0: ENS[Seq[Int]] = Left(List(0)) scala> mapSeq((1 to 3).map(Right(_)))(identity) folding folding folding res1: ENS[Seq[Int]] = Right(List(1, 2, 3))
type of values in the input sequence in the first parameter list.
type of values in the output sequence if successful.
list of values to which f should be applied.
function to map over l