Contiguous-block representation of grouped observations.
Definition GroupPartition.hpp:42
pcg32 RNG
Definition Stats.hpp:19
Eigen::Matrix< Feature, Eigen::Dynamic, Eigen::Dynamic > FeatureMatrix
Dynamic-size matrix of feature values.
Definition Types.hpp:24
Eigen::Matrix< Feature, Eigen::Dynamic, 1 > FeatureVector
Dynamic-size column vector of feature values.
Definition Types.hpp:26
int Response
Scalar type for group labels (integer).
Definition Types.hpp:21
Eigen::Matrix< Response, Eigen::Dynamic, 1 > ResponseVector
Dynamic-size column vector of group labels.
Definition Types.hpp:29
Definition Benchmark.hpp:22
Visitor interface for model dispatch.
Definition Model.hpp:34
Abstract base class for predictive models (trees and forests).
Definition Model.hpp:25
TrainingSpec::Ptr training_spec
Training specification used to build this model.
Definition Model.hpp:45
Tag type for requesting vote-proportion predictions.
Definition Model.hpp:19
Training configuration for projection pursuit trees and forests.
Definition TrainingSpec.hpp:40
std::shared_ptr< TrainingSpec > Ptr
Definition TrainingSpec.hpp:41
std::unique_ptr< TreeNode > Ptr
Definition TreeNode.hpp:20
TreeNode::Ptr root
Root node of the tree.
Definition Tree.hpp:62
bool operator==(Tree const &other) const
types::Response predict(types::FeatureVector const &data) const override
Predict a single observation.
bool operator!=(Tree const &other) const
Tree(TreeNode::Ptr root, TrainingSpec::Ptr training_spec)
types::FeatureMatrix predict(types::FeatureMatrix const &data, Proportions) const override
Predict proportions for a matrix of observations.
static Tree train(TrainingSpec const &training_spec, types::FeatureMatrix const &x, types::ResponseVector const &y, stats::RNG &rng)
Train a tree from a response vector.
types::ResponseVector predict(types::FeatureMatrix const &data) const override
Predict a matrix of observations.
void accept(Model::Visitor &visitor) const override
Accept a model visitor (double dispatch).
static Tree train(TrainingSpec const &training_spec, types::FeatureMatrix const &x, stats::GroupPartition const &group_spec, stats::RNG &rng)
Train a tree from a group partition.