Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Split Namespace Reference

Functions

template<typename T >
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
template<typename T >
requires same_as<typename T::Scalar, bool>
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
template<typename T >
requires same_as<typename T::Scalar, bJet>
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
template<typename T >
requires same_as<typename T::Scalar, float>
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
template<typename T >
requires same_as<typename T::Scalar, fJet>
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
template<typename T >
requires same_as<typename T::Scalar, int>
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
template<typename T >
requires same_as<typename T::Scalar, iJet>
ArrayXb threshold_mask (const T &x, const float &threshold)
 Applies a learned threshold to a feature, returning a mask.
 
float gini_impurity_index (const ArrayXf &classes, const vector< float > &uc)
 
float gain (const ArrayXf &lsplit, const ArrayXf &rsplit, bool classification, vector< float > unique_classes)
 
template<typename T >
vector< floatget_thresholds (const T &x)
 
tuple< string, floatget_best_variable_and_threshold (const Dataset &d, TreeNode &tn)
 
template<typename T >
tuple< float, floatbest_threshold (const T &x, const ArrayXf &y, bool classification)
 
template<typename T >
void get_best_threshold_by_type (const Dataset &d, auto &results)
 
template<typename Ts , std::size_t... Is>
auto get_best_thresholds (const Dataset &d, std::index_sequence< Is... >)
 
template<typename T >
stitch (array< T, 2 > &child_outputs, const ArrayXb &mask)
 Stitches together outputs from left or right child based on threshold.
 

Function Documentation

◆ best_threshold()

template<typename T >
tuple< float, float > Split::best_threshold ( const T & x,
const ArrayXf & y,
bool classification )

Definition at line 61 of file split.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gain()

float Split::gain ( const ArrayXf & lsplit,
const ArrayXf & rsplit,
bool classification,
vector< float > unique_classes )
Here is the caller graph for this function:

◆ get_best_threshold_by_type()

template<typename T >
void Split::get_best_threshold_by_type ( const Dataset & d,
auto & results )

Definition at line 115 of file split.h.

Here is the call graph for this function:

◆ get_best_thresholds()

template<typename Ts , std::size_t... Is>
auto Split::get_best_thresholds ( const Dataset & d,
std::index_sequence< Is... >  )

Definition at line 153 of file split.h.

Here is the call graph for this function:

◆ get_best_variable_and_threshold()

tuple< string, float > Split::get_best_variable_and_threshold ( const Dataset & d,
TreeNode & tn )
Here is the caller graph for this function:

◆ get_thresholds()

template<typename T >
vector< float > Split::get_thresholds ( const T & x)
Here is the caller graph for this function:

◆ gini_impurity_index()

float Split::gini_impurity_index ( const ArrayXf & classes,
const vector< float > & uc )

◆ stitch()

template<typename T >
T Split::stitch ( array< T, 2 > & child_outputs,
const ArrayXb & mask )

Stitches together outputs from left or right child based on threshold.

Definition at line 172 of file split.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ threshold_mask() [1/7]

template<typename T >
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 15 of file split.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ threshold_mask() [2/7]

template<typename T >
requires same_as<typename T::Scalar, bool>
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 15 of file split.h.

◆ threshold_mask() [3/7]

template<typename T >
requires same_as<typename T::Scalar, bJet>
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 19 of file split.h.

Here is the call graph for this function:

◆ threshold_mask() [4/7]

template<typename T >
requires same_as<typename T::Scalar, float>
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 26 of file split.h.

Here is the call graph for this function:

◆ threshold_mask() [5/7]

template<typename T >
requires same_as<typename T::Scalar, fJet>
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 30 of file split.h.

Here is the call graph for this function:

◆ threshold_mask() [6/7]

template<typename T >
requires same_as<typename T::Scalar, int>
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 39 of file split.h.

Here is the call graph for this function:

◆ threshold_mask() [7/7]

template<typename T >
requires same_as<typename T::Scalar, iJet>
ArrayXb Split::threshold_mask ( const T & x,
const float & threshold )

Applies a learned threshold to a feature, returning a mask.

Definition at line 44 of file split.h.

Here is the call graph for this function:
Here is the caller graph for this function: