Vita
model_measurements.h
Go to the documentation of this file.
1
13#if !defined(VITA_MODEL_MEASUREMENTS_H)
14#define VITA_MODEL_MEASUREMENTS_H
15
16#include "kernel/fitness.h"
17
18namespace vita
19{
24{
25 explicit model_measurements(const fitness_t &f = {}, double a = -1.0,
26 bool s = false)
27 : fitness(f), accuracy(a), is_solution(s)
28 {
29 Expects(accuracy <= 1.0);
30 }
31
32 fitness_t fitness;
33 double accuracy;
34 bool is_solution;
35 //double f1_score = std::numeric_limits<decltype(f1_score)>::quiet_NaN();
36};
37
48inline bool operator>=(const model_measurements &lhs,
49 const model_measurements &rhs)
50{
51 return dominating(lhs.fitness, rhs.fitness) &&
52 lhs.accuracy >= rhs.accuracy;
53}
54
55} // namespace vita
56
57#endif // include guard
The main namespace for the project.
A collection of measurements.
bool operator>=(const model_measurements &lhs, const model_measurements &rhs)