ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
ppforest2::dr::DRResult Struct Reference

Result of a dimensionality reduction step. More...

#include <DRStrategy.hpp>

Public Member Functions

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

Public Attributes

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

Detailed Description

Result of a dimensionality reduction step.

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

Constructor & Destructor Documentation

◆ DRResult()

ppforest2::dr::DRResult::DRResult ( std::vector< int > const & selected_cols,
size_t const original_size )
inline

Member Function Documentation

◆ expand()

pp::Projector ppforest2::dr::DRResult::expand ( 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 const ppforest2::dr::DRResult::original_size

Number of columns in the original (unreduced) matrix.

◆ selected_cols

std::vector<int> const ppforest2::dr::DRResult::selected_cols

Indices of the selected columns in the original matrix.


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