![]()  | 
  
    SG++-Doxygen-Documentation
    
   | 
 
Base class for supervised learning used to fit a model and quantify accuracy using a sgpp::datadriven::Metric with either testing or cross validation. More...
#include <Scorer.hpp>
Public Member Functions | |
| Scorer & | operator= (const Scorer &rhs)=default | 
| Copy assign operator.  More... | |
| Scorer & | operator= (Scorer &&rhs)=default | 
| Move assign operator.  More... | |
| Scorer (Metric *metric) | |
| Constructor.  More... | |
| Scorer (Scorer &&rhs)=default | |
| Move constructor.  More... | |
| double | test (ModelFittingBase &model, Dataset &testDataset) | 
| evaluate the accuracy on the test set using the sgpp::datadriven::Metric.  More... | |
| ~Scorer ()=default | |
| Destructor.  More... | |
Base class for supervised learning used to fit a model and quantify accuracy using a sgpp::datadriven::Metric with either testing or cross validation.
Splits a dataset into testing and training parts, trains the model and measures the accuracy.
      
  | 
  explicit | 
Constructor.
| metric | sgpp::datadriven::Metric to to quantify approximation quality of a trained model. Scorer will take ownership of this object. puts a random seed. | 
      
  | 
  default | 
Move constructor.
| rhs | R-value reference to a scorer object to moved from. | 
      
  | 
  default | 
Destructor.
Copy assign operator.
| rhs | const reference to the scorer object to copy from. | 
Move assign operator.
| rhs | R-value reference to an a scorer object to move from. | 
| double sgpp::datadriven::Scorer::test | ( | ModelFittingBase & | model, | 
| Dataset & | testDataset | ||
| ) | 
evaluate the accuracy on the test set using the sgpp::datadriven::Metric.
| model | model to be fitted based on the train dataset. | 
| testDataset | dataset used quantify accuracy using sgpp::datadriven::Metric. | 
References sgpp::datadriven::ModelFittingBase::evaluate(), sgpp::datadriven::Dataset::getData(), sgpp::datadriven::Dataset::getNumberInstances(), and sgpp::datadriven::Dataset::getTargets().