SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::datadriven::SparseGridMinerSplitting Class Reference

SparseGridMiner models a datamining process that involves a dataset that is first split into validation and training data. More...

#include <SparseGridMinerSplitting.hpp>

Inheritance diagram for sgpp::datadriven::SparseGridMinerSplitting:
sgpp::datadriven::SparseGridMiner

Public Member Functions

double evaluateLambda (double lambda, bool verbose)
 Fit the model using a specific lambda value and return a score for this lambda.
 
double learn (bool verbose) override
 Perform Learning cycle: Get samples from data source and based on the scoring procedure, generalize data by fitting and asses quality of the fit.
 
SparseGridMinerSplittingoperator= (const SparseGridMinerSplitting &rhs)=delete
 Default copy assign operator deleted because not all members can be copied.
 
SparseGridMinerSplittingoperator= (SparseGridMinerSplitting &&rhs)=default
 Default Move assign operator.
 
double optimizeLambda (bool verbose)
 Optimizes the lambda value for regularization.
 
 SparseGridMinerSplitting (const SparseGridMinerSplitting &rhs)=delete
 Copy constructor deleted - not all members can be copied or cloned .
 
 SparseGridMinerSplitting (DataSourceSplitting *dataSource, ModelFittingBase *fitter, Scorer *scorer, Visualizer *visualizer)
 Constructor.
 
 SparseGridMinerSplitting (SparseGridMinerSplitting &&rhs)=default
 Default Move constructor .
 
 ~SparseGridMinerSplitting () override=default
 Default destructor.
 
- Public Member Functions inherited from sgpp::datadriven::SparseGridMiner
ModelFittingBasegetModel ()
 Returns the trained model.
 
VisualizergetVisualizer ()
 
SparseGridMineroperator= (const SparseGridMiner &rhs)=delete
 Default copy assign operator deleted because not all members can be copied.
 
SparseGridMineroperator= (SparseGridMiner &&rhs)=default
 Default Move assign operator.
 
void setModel (ModelFittingBase *model)
 
 SparseGridMiner (const SparseGridMiner &rhs)=delete
 Copy constructor deleted - not all members can be copied or cloned .
 
 SparseGridMiner (ModelFittingBase *fitter, Scorer *scorer, Visualizer *visualizer)
 Constructor.
 
 SparseGridMiner (SparseGridMiner &&rhs)=default
 Default Move constructor .
 
double test (Dataset &testDataset)
 Evaluate the model on a certain test dataset.
 
virtual ~SparseGridMiner ()=default
 Default destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from sgpp::datadriven::SparseGridMiner
static void print (const char *message)
 Print output on one process.
 
static void print (const std::string &message)
 Print output on one process.
 
static void print (std::ostringstream &messageStream)
 Print output on one process.
 
- Protected Attributes inherited from sgpp::datadriven::SparseGridMiner
std::unique_ptr< ModelFittingBasefitter
 Fitter that trains a model based on data samples.
 
std::unique_ptr< Scorerscorer
 Scorer that quantifies the quality of a fit.
 
std::unique_ptr< Visualizervisualizer
 

Detailed Description

SparseGridMiner models a datamining process that involves a dataset that is first split into validation and training data.

The model is then trained on the training data for several epochs.

Constructor & Destructor Documentation

◆ SparseGridMinerSplitting() [1/3]

sgpp::datadriven::SparseGridMinerSplitting::SparseGridMinerSplitting ( DataSourceSplitting dataSource,
ModelFittingBase fitter,
Scorer scorer,
Visualizer visualizer 
)

Constructor.

Parameters
dataSourceconfigured instance of data source object, that will provide samples to learn from. The miner instance will take ownership of the passed object.
fitterconfigured instance of fitter object that generalize the model. The miner instance will take ownership of the passed object.
scorerconfigured instance of scorer object that will assess the quality of the generalization provided by the fitter on testing data. The miner instance will take ownership of the passed object.
visualizerconfigured instance of viusalizer object that will produce the output to visualize the model and its results

◆ SparseGridMinerSplitting() [2/3]

sgpp::datadriven::SparseGridMinerSplitting::SparseGridMinerSplitting ( const SparseGridMinerSplitting rhs)
delete

Copy constructor deleted - not all members can be copied or cloned .

Parameters
rhsthe object to copy from

◆ SparseGridMinerSplitting() [3/3]

sgpp::datadriven::SparseGridMinerSplitting::SparseGridMinerSplitting ( SparseGridMinerSplitting &&  rhs)
default

Default Move constructor .

Parameters
rhsthe object to move from

◆ ~SparseGridMinerSplitting()

sgpp::datadriven::SparseGridMinerSplitting::~SparseGridMinerSplitting ( )
overridedefault

Default destructor.

Member Function Documentation

◆ evaluateLambda()

double sgpp::datadriven::SparseGridMinerSplitting::evaluateLambda ( double  lambda,
bool  verbose 
)

Fit the model using a specific lambda value and return a score for this lambda.

References dataset, sgpp::datadriven::SparseGridMiner::fitter, sgpp::datadriven::Dataset::getNumberInstances(), lambda, and sgpp::datadriven::SparseGridMiner::scorer.

Referenced by optimizeLambda().

◆ learn()

double sgpp::datadriven::SparseGridMinerSplitting::learn ( bool  verbose)
overridevirtual

Perform Learning cycle: Get samples from data source and based on the scoring procedure, generalize data by fitting and asses quality of the fit.

The learning process first divides the data into training and validation data and trains the model for several epochs on the training data.

Implements sgpp::datadriven::SparseGridMiner.

References sgpp::datadriven::RefinementMonitorFactory::createRefinementMonitor(), dataset, sgpp::datadriven::SparseGridMiner::fitter, sgpp::datadriven::Dataset::getNumberInstances(), lambda, optimizeLambda(), sgpp::datadriven::SparseGridMiner::print(), sgpp::datadriven::RefinementMonitor::pushToBuffer(), sgpp::datadriven::RefinementMonitor::refinementsNecessary(), sgpp::datadriven::SparseGridMiner::scorer, and sgpp::datadriven::SparseGridMiner::visualizer.

◆ operator=() [1/2]

SparseGridMinerSplitting & sgpp::datadriven::SparseGridMinerSplitting::operator= ( const SparseGridMinerSplitting rhs)
delete

Default copy assign operator deleted because not all members can be copied.

Parameters
rhsthe object to copy from

◆ operator=() [2/2]

SparseGridMinerSplitting & sgpp::datadriven::SparseGridMinerSplitting::operator= ( SparseGridMinerSplitting &&  rhs)
default

Default Move assign operator.

Parameters
rhsthe object to move from

◆ optimizeLambda()

double sgpp::datadriven::SparseGridMinerSplitting::optimizeLambda ( bool  verbose)

Optimizes the lambda value for regularization.

In order to do this, multiple alpha vecotrs are created with different lambda values and Golden section search is used to quickly find the optimum.

References evaluateLambda(), sgpp::datadriven::SparseGridMiner::fitter, and sgpp::datadriven::SparseGridMiner::print().

Referenced by learn().


The documentation for this class was generated from the following files: