29 std::uintmax_t ok(0), total_nr(0);
31 for (
const auto &example : d)
33 if (
const auto res = (*l)(example);
34 has_value(res) && issmall(lexical_cast<D_DOUBLE>(res)
35 - label_as<D_DOUBLE>(example)))
42 return static_cast<double>(ok) /
static_cast<double>(total_nr);
56 std::uintmax_t ok(0), total_nr(0);
58 for (
const auto &example : d)
60 if (l->tag(example).label ==
label(example))
67 return static_cast<double>(ok) /
static_cast<double>(total_nr);
double operator()(const core_reg_lambda_f *, const dataframe &) const override
The model_metric class choose the appropriate method considering this type.
The model_metric class choose the appropriate method considering this type.
A 2-dimensional labeled data structure with columns of potentially different types.
The main namespace for the project.
bool has_value(const value_t &v)
class_t label(const dataframe::example &e)
Gets the class_t ID (aka label) for a given example.