61 const double * performances) :
62 GarpRule(prediction, numGenes, chrom1, chrom2, performances)
76 j = rnd.
get(_numGenes);
109 Scalar c2i2 = (*c2i); c2i2 *= c2i2;
110 sum += ( (*si) * (*c1i) ) + ( (*si) * c2i2 );
116 prob = 1.0 / (1.0 + (double) exp(-sum));
118 return (prob >= 0.5);
124 Scalar thisGene, otherGene;
141 otherGene = fabs(otherRule->
_chrom1[k]);
double get(double min, double max)
const double coeficientThreshold
double Scalar
Type of map values.
virtual bool applies(const Sample &sample) const
static Log * instance()
Returns the instance pointer, creating the object on the first call.
const Sample getB() const
virtual char type() const
Sample _chrom1
BYTE vector containing the genes (representation of the variables in a Genetic Algorithm.
virtual double getStrength(EnvCell *cell)
Scalar const * const_iterator
int _numGenes
Number of genes stored by the rule.
virtual void initialize(EnvCellSet *objEnvCellSet, const RuleSet *objRuleSet, bool *geneIsActivePtr, int *geneIndexPtr, int iActGenes)
const Sample getC() const
bool equalEps(double v1, double v2)
virtual char type() const
void info(const char *format,...)
'Info' level.
double getPerformance(PerfIndex perfIndex) const
virtual bool similar(Rule *objOtherRule)