![]() |
SG++-Doxygen-Documentation
|
The RegressionLearner class Solves a regression problem with continuous target vector. More...
#include <RegressionLearner.hpp>
Classes | |
class | Solver |
The RegressionLearner class Solves a regression problem with continuous target vector.
sgpp::datadriven::RegressionLearner::RegressionLearner | ( | sgpp::base::RegularGridConfiguration | gridConfig, |
sgpp::base::AdaptivityConfiguration | adaptivityConfig, | ||
sgpp::solver::SLESolverConfiguration | solverConfig, | ||
sgpp::solver::SLESolverConfiguration | finalSolverConfig, | ||
datadriven::RegularizationConfiguration | regularizationConfig, | ||
std::set< std::set< size_t > > | terms | ||
) |
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. |
sgpp::datadriven::RegressionLearner::RegressionLearner | ( | sgpp::base::RegularGridConfiguration | gridConfig, |
sgpp::base::AdaptivityConfiguration | adaptivityConfig, | ||
sgpp::solver::SLESolverConfiguration | solverConfig, | ||
sgpp::solver::SLESolverConfiguration | finalSolverConfig, | ||
datadriven::RegularizationConfiguration | regularizationConfig | ||
) |
gridConfig | |
adaptivityConfig | |
solverConfig | is the solver used during each adaptivity step |
finalSolverConfig | is the solver used to build the final model |
regularizationConfig |
base::Grid & sgpp::datadriven::RegressionLearner::getGrid | ( | ) |
getGrid
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge::getSparseGridFunction(), python.uq.learner.SimulationLearner.SimulationLearner::learnData(), python.uq.learner.SimulationLearner.SimulationLearner::learnDataWithFolding(), python.uq.learner.SimulationLearner.SimulationLearner::learnDataWithTest(), and python.uq.learner.SimulationLearner.SimulationLearner::refineGrid().
std::shared_ptr< sgpp::base::Grid > sgpp::datadriven::RegressionLearner::getGridPtr | ( | ) |
getGridPtr
size_t sgpp::datadriven::RegressionLearner::getGridSize | ( | ) | const |
getGridSize
Referenced by python.learner.TrainingStopPolicy.TrainingStopPolicy::hasGridSizeChanged(), and python.learner.TrainingStopPolicy.TrainingStopPolicy::isTrainingComplete().
double sgpp::datadriven::RegressionLearner::getMSE | ( | sgpp::base::DataMatrix & | data, |
const sgpp::base::DataVector & | y | ||
) |
base::DataVector sgpp::datadriven::RegressionLearner::getWeights | ( | ) | const |
getWeights
base::DataVector sgpp::datadriven::RegressionLearner::predict | ( | sgpp::base::DataMatrix & | data | ) |
predict
data | are observations |
References sgpp::op_factory::createOperationMultipleEval().
Referenced by getMSE().
void sgpp::datadriven::RegressionLearner::setWeights | ( | sgpp::base::DataVector | weights | ) |
setWeights
weights | are the new weights. |
void sgpp::datadriven::RegressionLearner::train | ( | sgpp::base::DataMatrix & | trainDataset, |
sgpp::base::DataVector & | classes | ||
) |
train fits a sparse grid regression model.
trainDataset | is the design matrix |
classes | is the (continuous) target |
References sgpp::datadriven::RegressionLearner::Solver::cg, sgpp::op_factory::createOperationMultipleEval(), sgpp::base::DataMatrix::getNrows(), sgpp::base::DataVector::getSize(), and sgpp::base::AdaptivityConfiguration::numRefinements_.