SG++

The RegressionLearner class Solves a regression problem with continuous target vector. More...

#include <RegressionLearner.hpp>

class  Solver

## Public Member Functions

sgpp::base::GridgetGrid ()
getGrid More...

size_t getGridSize () const
getGridSize More...

double getMSE (sgpp::base::DataMatrix &data, const sgpp::base::DataVector &y)
getMSE More...

sgpp::base::DataVector getWeights () const
getWeights More...

sgpp::base::DataVector predict (sgpp::base::DataMatrix &data)
predict More...

RegressionLearner. More...

RegressionLearner. More...

void setWeights (sgpp::base::DataVector weights)
setWeights More...

void train (sgpp::base::DataMatrix &trainDataset, sgpp::base::DataVector &classes)
train fits a sparse grid regression model. More...

## Detailed Description

The RegressionLearner class Solves a regression problem with continuous target vector.

## Constructor & Destructor Documentation

Parameters
 gridConfig adaptivityConfig solverConfig is the solver used during each adaptivity step finalSolverConfig is the solver used to build the final model regularizationConfig terms is a vector that contains all desired interaction terms. For example, if we want to include grid points that model an interaction between the first and the second predictor, we would include the vector [1,2] in terms.
Parameters
 gridConfig adaptivityConfig solverConfig is the solver used during each adaptivity step finalSolverConfig is the solver used to build the final model regularizationConfig

## Member Function Documentation

getGrid

Returns
the grid

getGridSize

Returns
the size of the grid
 double sgpp::datadriven::RegressionLearner::getMSE ( sgpp::base::DataMatrix & data, const sgpp::base::DataVector & y )

getMSE

Parameters
 data is the design matrix y is the target
Returns
the mean-squared-error of the prediction of the model for the matrix data

Referenced by setWeights().

getWeights

Returns
the weights
 base::DataVector sgpp::datadriven::RegressionLearner::predict ( sgpp::base::DataMatrix & data )

predict

Parameters
 data are observations
Returns
the predicted target for matrix data

Referenced by getMSE().

 void sgpp::datadriven::RegressionLearner::train ( sgpp::base::DataMatrix & trainDataset, sgpp::base::DataVector & classes )

train fits a sparse grid regression model.

Parameters
 trainDataset is the design matrix classes is the (continuous) target

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