openModeller  Version 1.5.0
RuleSet Class Reference

#include <RuleSet.h>

Collaboration diagram for RuleSet:
Collaboration graph

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)
 
Ruleget (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

RuleobjRules [MAX_RULES]
 
int intRules
 
int _dim
 
int iConfMatrix [2][2]
 
int iTotalPoints
 
int iTotalArea
 
int iPresenceArea
 
int iAbsenceArea
 
int iNonPredictedArea
 

Friends

class GarpAlgorithm
 

Detailed Description

Definition at line 35 of file RuleSet.h.

Constructor & Destructor Documentation

RuleSet::RuleSet ( )

Definition at line 35 of file RuleSet.cpp.

References iAbsenceArea, iNonPredictedArea, intRules, iPresenceArea, iTotalArea, MAX_RULES, and objRules.

RuleSet::~RuleSet ( )
virtual

Definition at line 49 of file RuleSet.cpp.

References clear().

Here is the call graph for this function:

Member Function Documentation

void RuleSet::addConfMatrix ( int  iPredictedValue,
int  iActualValue 
)
private

Definition at line 339 of file RuleSet.cpp.

References iConfMatrix.

Referenced by verify().

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 ( )
int RuleSet::countPad ( char  pad)

Definition at line 245 of file RuleSet.cpp.

References intRules, and objRules.

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().

Here is the call graph for this function:

void RuleSet::gatherRuleSetStats ( int  gen)

Definition at line 889 of file RuleSet.cpp.

References Rule::dblPerformance, Rule::Gene, intRules, objRules, and Rule::type().

Here is the call graph for this function:

double RuleSet::getAccuracy ( )

Definition at line 365 of file RuleSet.cpp.

References getPredictedPoints(), and iConfMatrix.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Scalar RuleSet::getValue ( const Sample sample) const

Definition at line 411 of file RuleSet.cpp.

References _dim, applyRulesToCell(), Rule::Gene, and objRules.

Referenced by GarpAlgorithm::getValue().

Here is the call graph for this function:

void RuleSet::loadText ( char *  strFilename)
void RuleSet::log ( )

Definition at line 439 of file RuleSet.cpp.

References intRules, Rule::log(), and objRules.

Here is the call graph for this function:

void RuleSet::resetConfMatrix ( EnvCellSet objTestDataset)
private

Definition at line 319 of file RuleSet.cpp.

References EnvCellSet::count(), iConfMatrix, and iTotalPoints.

Referenced by verify().

Here is the call graph for this function:

void RuleSet::saveText ( char *  strFilename)

Definition at line 127 of file RuleSet.cpp.

References intRules, and objRules.

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.

void RuleSet::setDimension ( int  dim)
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.

References intRules, and objRules.

void RuleSet::setPad ( char  pad)

Definition at line 238 of file RuleSet.cpp.

References intRules, and objRules.

void RuleSet::sort ( int  intPerfIndex)

Definition at line 257 of file RuleSet.cpp.

References intRules, and objRules.

char * RuleSet::toXML ( char *  id)

Definition at line 83 of file RuleSet.cpp.

References intRules, objRules, size(), and Rule::toXML().

Here is the call graph for this function:

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.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class GarpAlgorithm
friend

Definition at line 38 of file RuleSet.h.

Member Data Documentation

int RuleSet::_dim
private

Definition at line 44 of file RuleSet.h.

Referenced by getValue(), and setDimension().

int RuleSet::iAbsenceArea
private

Definition at line 53 of file RuleSet.h.

Referenced by clear(), and RuleSet().

int RuleSet::iConfMatrix[2][2]
private
int RuleSet::iNonPredictedArea
private

Definition at line 54 of file RuleSet.h.

Referenced by clear(), and RuleSet().

int RuleSet::iPresenceArea
private

Definition at line 52 of file RuleSet.h.

Referenced by clear(), and RuleSet().

int RuleSet::iTotalArea
private

Definition at line 51 of file RuleSet.h.

Referenced by clear(), and RuleSet().

int RuleSet::iTotalPoints
private

Definition at line 48 of file RuleSet.h.

Referenced by getTotalPoints(), and resetConfMatrix().


The documentation for this class was generated from the following files: