package trees
Package Members
- package classification
- package impurity
- package multitask
- package regression
- package splits
Type Members
- class FeaturePowerSetTerms extends AnyRef
Weighted combinatorial factors corresponding to the power-set of features that are included
Weighted combinatorial factors corresponding to the power-set of features that are included
The set is extended as new features are encountered. Each element in
weightBySubsetSizecorresponds to all of the subsets of the features that are included vs excluded of a given size:- the 0th element corresponds to the term where all of the encountered features are excluded,
- the 1st element sums the terms that have exactly one of the encountered feature included,
- the 2nd element sums the terms that have exactly two of the encountered features included, and so on and so forth. The final element represents the single term where all of the features are "turned on".
The calculation is performed efficiently using a dynamic programming technique that runs in quadratic time with the number of features. It is described in the
extendandunwindmethods. - case class FeatureWeightFactor(weightWhenExcluded: Double, weightWhenIncluded: Double) extends Product with Serializable
Description of a feature's effect on the weight ascribed to the node
Description of a feature's effect on the weight ascribed to the node
Decision trees can be thought of as weighted sums over their leaves. When there is knowledge of every feature, all of the weight goes into a single leaf. However, when feature are excluded from the prediction, then both paths of decisions that depend on those excluded features are assigned non-zero weights that are proportional to the share of the training data that followed that path.
This class captures those weights for a single feature and a single node. The
weightWhenIncludedgives the factor of the weight of the node due to this feature when the feature is included (i.e. known). It is always 0 or 1. TheweightWhenExcludedgives the factor of the weight of the node due to this feature when the feature is excluded (i.e. unknown). It is always strictly greater than 0 and strictly less than 1.- weightWhenExcluded
factor of the weight of the leaf when the feature is excluded
- weightWhenIncluded
factor of the weight of the leaf when the feature is included
- class InternalModelNode[T <: PredictionResult[Any]] extends ModelNode[T]
Internal node in the decision tree
Internal node in the decision tree
- T
type of the output
- class ModelLeaf[T] extends ModelNode[PredictionResult[T]]
- trait ModelNode[+T <: PredictionResult[Any]] extends Serializable
- class TrainingLeaf[T] extends TrainingNode[AnyVal, T]
Average the training data to make a leaf prediction
- abstract class TrainingNode[T <: AnyVal, S] extends Serializable
Class to provide getNode interface for internal and leaf training nodes Created by maxhutch on 11/29/16.
Class to provide getNode interface for internal and leaf training nodes Created by maxhutch on 11/29/16.
- T
type of the input vector
- S
type of the model output
- case class TreeMeta(depth: Int) extends Product with Serializable
Created by maxhutch on 12/21/16.