ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Types.hpp File Reference
#include "utils/UserError.hpp"
#include <Eigen/Dense>
#include <string>
#include <string_view>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  ppforest2
 Binarization strategies for multiclass-to-binary reduction.
 
namespace  ppforest2::types
 Core numeric type aliases for the ppforest2 library.
 

Typedefs

using ppforest2::types::Feature = float
 Scalar type for feature values.
 
using ppforest2::types::FeatureMatrix = Eigen::Matrix<Feature, Eigen::Dynamic, Eigen::Dynamic>
 Dynamic-size matrix of feature values.
 
using ppforest2::types::FeatureVector = Eigen::Matrix<Feature, Eigen::Dynamic, 1>
 Dynamic-size column vector of feature values.
 
using ppforest2::types::GroupId = int
 Scalar type for internal group labels (integer). Used as map keys, set elements, and partition indices.
 
using ppforest2::types::GroupIdVector = Eigen::Matrix<GroupId, Eigen::Dynamic, 1>
 Dynamic-size column vector of internal group labels.
 
template<typename T>
using ppforest2::types::Matrix = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
 Generic dynamic-size matrix.
 
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).
 
using ppforest2::types::Outcome = Feature
 Scalar type for predictions (float for both classification and regression).
 
using ppforest2::types::OutcomeVector = Eigen::Matrix<Outcome, Eigen::Dynamic, 1>
 Dynamic-size column vector of predictions.
 
template<typename T>
using ppforest2::types::Vector = Eigen::Matrix<T, Eigen::Dynamic, 1>
 Generic dynamic-size column vector.
 

Enumerations

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

Functions

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