r2_score.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_CV_METRICS_R2SCORE_HPP
13 #define MLPACK_CORE_CV_METRICS_R2SCORE_HPP
14 
15 #include <mlpack/core.hpp>
16 
17 namespace mlpack {
18 namespace cv {
19 
50 template<bool AdjustedR2>
51 class R2Score
52 {
53  public:
63  template<typename MLAlgorithm, typename DataType, typename ResponsesType>
64  static double Evaluate(MLAlgorithm& model,
65  const DataType& data,
66  const ResponsesType& responses);
67 
72  static const bool NeedsMinimization = false;
73 };
74 
75 } // namespace cv
76 } // namespace mlpack
77 
78 // Include implementation.
79 #include "r2_score_impl.hpp"
80 
81 #endif
The R2 Score is a metric of performance for regression algorithms that represents the proportion of v...
Definition: r2_score.hpp:51
Linear algebra utility functions, generally performed on matrices or vectors.
constexpr auto data(Container const &container) noexcept -> decltype(container.data())
Definition: iterator.hpp:79
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
static double Evaluate(MLAlgorithm &model, const DataType &data, const ResponsesType &responses)
Run prediction and calculate the R squared or Adjusted R squared error.
static const bool NeedsMinimization
Information for hyper-parameter tuning code.
Definition: r2_score.hpp:72