ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Stats.hpp File Reference
#include "utils/RangeVector.hpp"
#include "utils/Types.hpp"
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <stdexcept>
#include <vector>
#include <Eigen/Dense>
#include <pcg_random.hpp>

Go to the source code of this file.

Namespaces

namespace  ppforest2
 Binarization strategies for multiclass-to-binary reduction.
 
namespace  ppforest2::stats
 Statistical infrastructure for training and evaluation.
 

Typedefs

using ppforest2::stats::RNG = pcg32
 

Functions

std::map< types::GroupId, int > ppforest2::stats::group_indices (std::set< types::GroupId > const &groups)
 Map each label in groups to its index in iteration order.
 
types::Outcome ppforest2::stats::majority_vote (std::vector< types::Outcome > const &preds)
 Majority vote over a sequence of integer-coded class labels.
 
types::Outcome ppforest2::stats::mean (std::vector< types::Outcome > const &preds)
 Arithmetic mean of a sequence of outcome values.
 
template<typename Derived>
double ppforest2::stats::sd (Eigen::MatrixBase< Derived > const &data)
 Sample standard deviation of a vector — sqrt(var(data)).
 
types::FeatureVector ppforest2::stats::sd (types::FeatureMatrix const &data)
 Column-wise sample standard deviation — element-wise sqrt of var.
 
template<typename Y>
void ppforest2::stats::sort (types::FeatureMatrix &x, Y &y)
 Sort a feature matrix and a response vector by the response values.
 
std::set< types::GroupIdppforest2::stats::unique (types::GroupIdVector const &column)
 Unique group labels in a response vector.
 
template<typename Derived>
double ppforest2::stats::var (Eigen::MatrixBase< Derived > const &data)
 Sample variance of a vector (unbiased, n-1 denominator).
 
types::FeatureVector ppforest2::stats::var (types::FeatureMatrix const &data)
 Column-wise sample variance of a matrix.