ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
ppforest2::stats::DataPacket Struct Reference

Bundled dataset: features, responses, and group labels. More...

#include <DataPacket.hpp>

Public Member Functions

 DataPacket ()
 
 DataPacket (types::FeatureMatrix const &x, types::Vector< types::Response > const &y, std::set< types::Response > const &groups, std::vector< std::string > const &group_names={}, std::vector< std::string > const &feature_names={})
 
 DataPacket (types::FeatureMatrix const &x, types::Vector< types::Response > const &y, std::vector< std::string > const &group_names={}, std::vector< std::string > const &feature_names={})
 

Public Attributes

std::vector< std::string > const feature_names
 Original feature column names from the CSV header.
 
std::vector< std::string > const group_names
 Original group label names, indexed by integer code.
 
std::set< types::Response > const groups
 Set of distinct group labels.
 
types::FeatureMatrix const x
 Feature matrix (n × p).
 
types::Vector< types::Response > const y
 Response vector (n).
 

Detailed Description

Bundled dataset: features, responses, and group labels.

Convenience struct that groups a feature matrix, a response vector, and the set of unique group labels. Used primarily for passing data through the training pipeline.

Constructor & Destructor Documentation

◆ DataPacket() [1/3]

ppforest2::stats::DataPacket::DataPacket ( types::FeatureMatrix const & x,
types::Vector< types::Response > const & y,
std::set< types::Response > const & groups,
std::vector< std::string > const & group_names = {},
std::vector< std::string > const & feature_names = {} )
inline

◆ DataPacket() [2/3]

ppforest2::stats::DataPacket::DataPacket ( types::FeatureMatrix const & x,
types::Vector< types::Response > const & y,
std::vector< std::string > const & group_names = {},
std::vector< std::string > const & feature_names = {} )
inline

◆ DataPacket() [3/3]

ppforest2::stats::DataPacket::DataPacket ( )
inline

Member Data Documentation

◆ feature_names

std::vector<std::string> const ppforest2::stats::DataPacket::feature_names

Original feature column names from the CSV header.

When populated, feature_names[j] is the header label for column j of x. Empty when data is simulated.

◆ group_names

std::vector<std::string> const ppforest2::stats::DataPacket::group_names

Original group label names, indexed by integer code.

When populated, group_names[i] is the original string label that maps to integer code i. Empty when data is not read from CSV (e.g., simulated data).

◆ groups

std::set<types::Response> const ppforest2::stats::DataPacket::groups

Set of distinct group labels.

◆ x

types::FeatureMatrix const ppforest2::stats::DataPacket::x

Feature matrix (n × p).

◆ y

types::Vector<types::Response> const ppforest2::stats::DataPacket::y

Response vector (n).


The documentation for this struct was generated from the following file: