107 for (i = rules; i <
_size; i++)
132 if (
_rules[i]->getPerformance(index) < threshold)
145 _rules[_numRules - 1] = NULL;
167 double newRulePerformance;
181 if (newRulePerformance >
_rules[i]->getPerformance(perfIndex))
188 for (j = _numRules - 1; j >= i; j--)
214 if (!rule || index < 0 || index >=
_numRules)
272 if (
_rules[i]->similar(rule) ) {
291 if (
_rules[i]->applies(x)) {
312 *worst = *best = *average = 0.0;
321 if (performance < *worst || !i) *worst = performance;
322 if (performance > *best || !i) *best = performance;
323 *average += performance;
350 for (
int i = 0; i < 3; i++)
354 case 0: type =
'd';
break;
355 case 1: type =
'!';
break;
356 case 2: type =
'r';
break;
367 if (rule->
type() == type)
372 if (max < rule->getPerformance(
PerfUtil))
380 printf(
"%c %2d %+7.2f %+7.2f %2d|", type, ct, max, sum / ct, pres);
int findSimilar(GarpRule *rule)
double Scalar
Type of map values.
int replace(int index, GarpRule *rule)
static Log * instance()
Returns the instance pointer, creating the object on the first call.
Scalar getValue(const Sample &x) const
void filter(PerfIndex perfIndex, double threshold)
void performanceSummary(PerfIndex perfIndex, double *best, double *worst, double *average)
GarpRule * get(int index)
void gatherRuleSetStats(int gen)
int insert(PerfIndex perfIndex, GarpRule *rule)
Scalar getPrediction() const
virtual char type() const
void info(const char *format,...)
'Info' level.
double getPerformance(PerfIndex perfIndex) const