openModeller
Version 1.5.0
|
#include <RuleSet.h>
Public Member Functions | |
RuleSet () | |
virtual | ~RuleSet () |
void | log () |
void | setDimension (int dim) |
void | loadText (char *strFilename) |
void | saveText (char *strFilename) |
char * | toXML (char *id) |
void | verify (EnvCellSet *objTestDataset, double dAccLimit) |
int | getConfMatrix (int iPredictedValue, int iActualValue) |
int | getTotalPoints () |
int | getPredictedPoints () |
int | getUnpredictedPoints () |
double | getAccuracy () |
double | getOverallAccuracy () |
void | setActiveGenes (bool *bGeneIsActivePtr, int *iGeneIndexPtr, int iActiveGenesAux) |
int | applyRulesToCell (EnvCell *cell, double Accuracylimit) const |
void | updateRuleUsage () |
int | size () |
void | add (Rule *objRule) |
void | set (int index, Rule *objRule) |
Rule * | get (int index) |
Scalar | getValue (const Sample &sample) const |
void | clear () |
void | sort (int intPerfIndex) |
void | trim (int intMaxRules) |
void | discardRules (int iPerfIndex, double dValue) |
void | setEvaluation (bool value) |
void | setPad (char pad) |
int | countPad (char pad) |
double | getOveralPerformance (int iPerfIndex, int iFirstRulesToBeIncluded) |
void | gatherRuleSetStats (int gen) |
Private Member Functions | |
void | resetConfMatrix (EnvCellSet *objTestDataset) |
void | addConfMatrix (int iPredictedValue, int iActualValue) |
Private Attributes | |
Rule * | objRules [MAX_RULES] |
int | intRules |
int | _dim |
int | iConfMatrix [2][2] |
int | iTotalPoints |
int | iTotalArea |
int | iPresenceArea |
int | iAbsenceArea |
int | iNonPredictedArea |
Friends | |
class | GarpAlgorithm |
RuleSet::RuleSet | ( | ) |
Definition at line 35 of file RuleSet.cpp.
References iAbsenceArea, iNonPredictedArea, intRules, iPresenceArea, iTotalArea, MAX_RULES, and objRules.
|
virtual |
Definition at line 49 of file RuleSet.cpp.
References clear().
void RuleSet::add | ( | Rule * | objRule | ) |
Definition at line 165 of file RuleSet.cpp.
References intRules, MAX_RULES, and objRules.
Referenced by GarpAlgorithm::_setConfiguration(), GarpAlgorithm::colonize(), GarpAlgorithm::concatenateRuleSets(), GarpAlgorithm::saveRule(), and GarpAlgorithm::select().
|
private |
int RuleSet::applyRulesToCell | ( | EnvCell * | cell, |
double | Accuracylimit | ||
) | const |
Definition at line 622 of file RuleSet.cpp.
References Rule::dblPerformance, Rule::Gene, intRules, and objRules.
Referenced by getValue(), and verify().
void RuleSet::clear | ( | ) |
Definition at line 55 of file RuleSet.cpp.
References iAbsenceArea, iNonPredictedArea, intRules, iPresenceArea, iTotalArea, and objRules.
Referenced by GarpAlgorithm::_setConfiguration(), GarpAlgorithm::select(), and ~RuleSet().
int RuleSet::countPad | ( | char | pad | ) |
Definition at line 245 of file RuleSet.cpp.
void RuleSet::discardRules | ( | int | iPerfIndex, |
double | dValue | ||
) |
Definition at line 194 of file RuleSet.cpp.
References GarpUtil::equalEps(), intRules, and objRules.
Referenced by GarpAlgorithm::generate().
void RuleSet::gatherRuleSetStats | ( | int | gen | ) |
Definition at line 889 of file RuleSet.cpp.
References Rule::dblPerformance, Rule::Gene, intRules, objRules, and Rule::type().
Rule * RuleSet::get | ( | int | index | ) |
Definition at line 153 of file RuleSet.cpp.
References objRules.
Referenced by GarpAlgorithm::_getConfiguration(), GarpAlgorithm::concatenateRuleSets(), GarpAlgorithm::crossover(), GarpAlgorithm::evaluate(), GarpAlgorithm::join(), GarpAlgorithm::measure(), GarpAlgorithm::mutate(), GarpAlgorithm::saveRule(), and GarpAlgorithm::select().
double RuleSet::getAccuracy | ( | ) |
Definition at line 365 of file RuleSet.cpp.
References getPredictedPoints(), and iConfMatrix.
int RuleSet::getConfMatrix | ( | int | iPredictedValue, |
int | iActualValue | ||
) |
Definition at line 330 of file RuleSet.cpp.
References iConfMatrix.
double RuleSet::getOverallAccuracy | ( | ) |
Definition at line 370 of file RuleSet.cpp.
References getTotalPoints(), and iConfMatrix.
double RuleSet::getOveralPerformance | ( | int | iPerfIndex, |
int | iFirstRulesToBeIncluded | ||
) |
Definition at line 382 of file RuleSet.cpp.
References Rule::dblPerformance, intRules, and objRules.
Referenced by GarpAlgorithm::DisplayStatus().
int RuleSet::getPredictedPoints | ( | ) |
Definition at line 353 of file RuleSet.cpp.
References iConfMatrix.
Referenced by getAccuracy(), and getUnpredictedPoints().
int RuleSet::getTotalPoints | ( | ) |
Definition at line 348 of file RuleSet.cpp.
References iTotalPoints.
Referenced by getOverallAccuracy(), and getUnpredictedPoints().
int RuleSet::getUnpredictedPoints | ( | ) |
Definition at line 359 of file RuleSet.cpp.
References getPredictedPoints(), and getTotalPoints().
Definition at line 411 of file RuleSet.cpp.
References _dim, applyRulesToCell(), Rule::Gene, and objRules.
Referenced by GarpAlgorithm::getValue().
void RuleSet::loadText | ( | char * | strFilename | ) |
void RuleSet::log | ( | ) |
Definition at line 439 of file RuleSet.cpp.
References intRules, Rule::log(), and objRules.
|
private |
Definition at line 319 of file RuleSet.cpp.
References EnvCellSet::count(), iConfMatrix, and iTotalPoints.
Referenced by verify().
void RuleSet::saveText | ( | char * | strFilename | ) |
Definition at line 127 of file RuleSet.cpp.
void RuleSet::set | ( | int | index, |
Rule * | objRule | ||
) |
Definition at line 161 of file RuleSet.cpp.
References objRules.
void RuleSet::setActiveGenes | ( | bool * | bGeneIsActivePtr, |
int * | iGeneIndexPtr, | ||
int | iActiveGenesAux | ||
) |
Definition at line 72 of file RuleSet.cpp.
References Rule::bGeneIsActive, Rule::iActiveGenes, Rule::iGeneIndex, intRules, and objRules.
|
inline |
Definition at line 65 of file RuleSet.h.
References _dim.
Referenced by GarpAlgorithm::_setConfiguration(), and GarpAlgorithm::initialize().
void RuleSet::setEvaluation | ( | bool | value | ) |
Definition at line 231 of file RuleSet.cpp.
void RuleSet::setPad | ( | char | pad | ) |
Definition at line 238 of file RuleSet.cpp.
int RuleSet::size | ( | ) |
Definition at line 157 of file RuleSet.cpp.
References intRules.
Referenced by GarpAlgorithm::_getConfiguration(), GarpAlgorithm::concatenateRuleSets(), GarpAlgorithm::evaluate(), GarpAlgorithm::generate(), GarpAlgorithm::measure(), GarpAlgorithm::ruleSetSize(), GarpAlgorithm::saveRule(), GarpAlgorithm::select(), and toXML().
void RuleSet::sort | ( | int | intPerfIndex | ) |
Definition at line 257 of file RuleSet.cpp.
char * RuleSet::toXML | ( | char * | id | ) |
Definition at line 83 of file RuleSet.cpp.
References intRules, objRules, size(), and Rule::toXML().
void RuleSet::trim | ( | int | intMaxRules | ) |
Definition at line 179 of file RuleSet.cpp.
References intRules, and objRules.
Referenced by GarpAlgorithm::generate().
void RuleSet::updateRuleUsage | ( | ) |
Definition at line 376 of file RuleSet.cpp.
void RuleSet::verify | ( | EnvCellSet * | objTestDataset, |
double | dAccLimit | ||
) |
Definition at line 281 of file RuleSet.cpp.
References addConfMatrix(), applyRulesToCell(), EnvCellSet::count(), Rule::Gene, EnvCellSet::get(), intRules, objRules, resetConfMatrix(), and EnvCell::values.
|
friend |
|
private |
Definition at line 44 of file RuleSet.h.
Referenced by getValue(), and setDimension().
|
private |
|
private |
Definition at line 47 of file RuleSet.h.
Referenced by addConfMatrix(), getAccuracy(), getConfMatrix(), getOverallAccuracy(), getPredictedPoints(), and resetConfMatrix().
|
private |
|
private |
Definition at line 42 of file RuleSet.h.
Referenced by add(), applyRulesToCell(), clear(), countPad(), discardRules(), gatherRuleSetStats(), getOveralPerformance(), log(), RuleSet(), GarpAlgorithm::saveRule(), saveText(), setActiveGenes(), setEvaluation(), setPad(), size(), sort(), toXML(), trim(), and verify().
|
private |
|
private |
|
private |
Definition at line 48 of file RuleSet.h.
Referenced by getTotalPoints(), and resetConfMatrix().
Definition at line 41 of file RuleSet.h.
Referenced by add(), applyRulesToCell(), clear(), countPad(), discardRules(), gatherRuleSetStats(), get(), getOveralPerformance(), getValue(), log(), RuleSet(), GarpAlgorithm::saveRule(), saveText(), GarpAlgorithm::select(), set(), setActiveGenes(), setEvaluation(), setPad(), sort(), toXML(), trim(), and verify().