ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
ppforest2::vars::VariableSelection::Result Struct Reference

Result of a variable selection step. More...

#include <VariableSelection.hpp>

Public Member Functions

 Result ()=default
 
 Result (std::vector< int > const &selected_cols, size_t original_size)
 
::ppforest2::pp::Projector expand (::ppforest2::pp::Projector const &reduced_vector) const
 Expand a reduced-dimension projector to the original space.
 

Public Attributes

size_t original_size = 0
 Number of columns in the original (unreduced) matrix.
 
std::vector< int > selected_cols
 Indices of the selected columns in the original matrix.
 

Detailed Description

Result of a variable selection step.

Records which columns were selected and allows expanding a reduced-dimension projector back to the original feature space.

Constructor & Destructor Documentation

◆ Result() [1/2]

ppforest2::vars::VariableSelection::Result::Result ( )
default

◆ Result() [2/2]

ppforest2::vars::VariableSelection::Result::Result ( std::vector< int > const & selected_cols,
size_t original_size )
inline

Member Function Documentation

◆ expand()

::ppforest2::pp::Projector ppforest2::vars::VariableSelection::Result::expand ( ::ppforest2::pp::Projector const & reduced_vector) const
inline

Expand a reduced-dimension projector to the original space.

Places each element of reduced_vector at the position of the corresponding selected column; all other positions are zero.

Parameters
reduced_vectorProjector in the reduced space (q).
Returns
Projector in the original space (p), zero-padded.

Member Data Documentation

◆ original_size

size_t ppforest2::vars::VariableSelection::Result::original_size = 0

Number of columns in the original (unreduced) matrix.

◆ selected_cols

std::vector<int> ppforest2::vars::VariableSelection::Result::selected_cols

Indices of the selected columns in the original matrix.


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