ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
ppforest2::types Namespace Reference

Core numeric type aliases for the ppforest2 library. More...

Typedefs

using Feature = float
 Scalar type for feature values.
 
using FeatureMatrix = Eigen::Matrix<Feature, Eigen::Dynamic, Eigen::Dynamic>
 Dynamic-size matrix of feature values.
 
using FeatureVector = Eigen::Matrix<Feature, Eigen::Dynamic, 1>
 Dynamic-size column vector of feature values.
 
using GroupId = int
 Scalar type for internal group labels (integer). Used as map keys, set elements, and partition indices.
 
using GroupIdVector = Eigen::Matrix<GroupId, Eigen::Dynamic, 1>
 Dynamic-size column vector of internal group labels.
 
template<typename T>
using Matrix = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
 Generic dynamic-size matrix.
 
using Names = std::vector<std::string>
 Vector of name strings — used uniformly for class labels (group_names[i] is the label for GroupId == i) and feature names (feature_names[j] is the column name at index j).
 
using Outcome = Feature
 Scalar type for predictions (float for both classification and regression).
 
using OutcomeVector = Eigen::Matrix<Outcome, Eigen::Dynamic, 1>
 Dynamic-size column vector of predictions.
 
template<typename T>
using Vector = Eigen::Matrix<T, Eigen::Dynamic, 1>
 Generic dynamic-size column vector.
 

Enumerations

enum class  Mode : uint8_t { Classification , Regression }
 Training mode. More...
 

Functions

bool is_classification (Mode mode)
 Whether mode is Classification.
 
bool is_regression (Mode mode)
 Whether mode is Regression.
 
Mode mode_from_string (std::string_view s)
 Training mode from string.
 
std::string to_string (Mode mode)
 Canonical string form of a training mode.
 

Detailed Description

Core numeric type aliases for the ppforest2 library.

All matrix and vector types are Eigen dynamic-size types. Feature precision is single-precision (float), which is sufficient for classification. If a future strategy (e.g. regression) needs higher precision internally, it can cast to double within its own scope.

GroupId is the internal integer type for group labels, partition keys, and confusion matrices. Outcome is the prediction type — currently an alias for int, but will become Feature (float) to support regression.

Typedef Documentation

◆ Feature

Scalar type for feature values.

◆ FeatureMatrix

using ppforest2::types::FeatureMatrix = Eigen::Matrix<Feature, Eigen::Dynamic, Eigen::Dynamic>

Dynamic-size matrix of feature values.

◆ FeatureVector

using ppforest2::types::FeatureVector = Eigen::Matrix<Feature, Eigen::Dynamic, 1>

Dynamic-size column vector of feature values.

◆ GroupId

Scalar type for internal group labels (integer). Used as map keys, set elements, and partition indices.

◆ GroupIdVector

using ppforest2::types::GroupIdVector = Eigen::Matrix<GroupId, Eigen::Dynamic, 1>

Dynamic-size column vector of internal group labels.

◆ Matrix

template<typename T>
using ppforest2::types::Matrix = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>

Generic dynamic-size matrix.

◆ Names

using ppforest2::types::Names = std::vector<std::string>

Vector of name strings — used uniformly for class labels (group_names[i] is the label for GroupId == i) and feature names (feature_names[j] is the column name at index j).

◆ Outcome

Scalar type for predictions (float for both classification and regression).

◆ OutcomeVector

using ppforest2::types::OutcomeVector = Eigen::Matrix<Outcome, Eigen::Dynamic, 1>

Dynamic-size column vector of predictions.

◆ Vector

template<typename T>
using ppforest2::types::Vector = Eigen::Matrix<T, Eigen::Dynamic, 1>

Generic dynamic-size column vector.

Enumeration Type Documentation

◆ Mode

enum class ppforest2::types::Mode : uint8_t
strong

Training mode.

Enumerator
Classification 
Regression 

Function Documentation

◆ is_classification()

bool ppforest2::types::is_classification ( Mode mode)
inline

Whether mode is Classification.

◆ is_regression()

bool ppforest2::types::is_regression ( Mode mode)
inline

Whether mode is Regression.

◆ mode_from_string()

Mode ppforest2::types::mode_from_string ( std::string_view s)
inline

Training mode from string.

◆ to_string()

std::string ppforest2::types::to_string ( Mode mode)
inline

Canonical string form of a training mode.