Public Member Functions | Public Attributes | Private Attributes
MultipleClassifiers Class Reference

#include <MultipleClassifiers.hh>

Inheritance diagram for MultipleClassifiers:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual float getConf (const std::vector< float > &s)
virtual MultipleClassifiersgetCopy ()
void initModels ()
float klDivergence (const std::vector< float > &input)
 MultipleClassifiers (int id, int modelType, int predType, int nModels, int trainMode, int trainFreq, float featPct, float expPct, float treeThreshold, bool stoch, float featRange, Random rng)
 MultipleClassifiers (const MultipleClassifiers &)
virtual void testInstance (const std::vector< float > &input, std::map< float, float > *retval)
virtual bool trainInstance (classPair &instance)
virtual bool trainInstances (std::vector< classPair > &instances)
void updateModelAccuracy (int i, const std::vector< float > &input, float out)
float variance (const std::vector< float > &input)
 ~MultipleClassifiers ()

Public Attributes

bool ACC_DEBUG
bool CONF_DEBUG
bool COPYDEBUG
std::vector< Classifier * > models
bool PRED_DEBUG
bool STDEBUG

Private Attributes

std::vector< float > accuracy
const bool addNoise
float expPct
float featPct
const float featRange
const int freq
const int id
std::vector< std::map< float,
float > > 
infos
const int mode
const int modelType
const int nModels
int nsteps
const int predType
Random rng
const bool stoch
const float treeThresh

Detailed Description

Multiple Classifiers class: uses an ensemble of classifiers, such as a set of decision trees in a random forest

Definition at line 22 of file MultipleClassifiers.hh.


Constructor & Destructor Documentation

MultipleClassifiers::MultipleClassifiers ( int  id,
int  modelType,
int  predType,
int  nModels,
int  trainMode,
int  trainFreq,
float  featPct,
float  expPct,
float  treeThreshold,
bool  stoch,
float  featRange,
Random  rng 
)

Default Constructor

Parameters:
ididentify the model
modelTypeidentifies which type of model to use
predTypeidentifies how to combine multiple models
nModels# of models to use for ensemble models (i.e. random forests)
trainModebuild every step? only on errors? every freq steps?
trainFreqfrequency of model building if using latter mode
featPctpct of features to remove from set used for each tree split
expPctpct of experiences to give to each model
treeThresholddetermines the amount of error to be tolerated in the tree (prevents over-fitting with larger and larger trees)
stochif the domain is stochastic or deterministic
rngRandom Number Generator

Definition at line 10 of file MultipleClassifiers.cc.

Copy constructor

Definition at line 41 of file MultipleClassifiers.cc.

Definition at line 77 of file MultipleClassifiers.cc.


Member Function Documentation

float MultipleClassifiers::getConf ( const std::vector< float > &  s) [virtual]

Implements Classifier.

Definition at line 290 of file MultipleClassifiers.cc.

Implements Classifier.

Definition at line 70 of file MultipleClassifiers.cc.

Initialize models

Definition at line 406 of file MultipleClassifiers.cc.

float MultipleClassifiers::klDivergence ( const std::vector< float > &  input)

Calculate kl divergence of the model's predicted probability distributions

Definition at line 329 of file MultipleClassifiers.cc.

void MultipleClassifiers::testInstance ( const std::vector< float > &  input,
std::map< float, float > *  retval 
) [virtual]

Implements Classifier.

Definition at line 186 of file MultipleClassifiers.cc.

Implements Classifier.

Definition at line 145 of file MultipleClassifiers.cc.

bool MultipleClassifiers::trainInstances ( std::vector< classPair > &  instances) [virtual]

Implements Classifier.

Definition at line 87 of file MultipleClassifiers.cc.

void MultipleClassifiers::updateModelAccuracy ( int  i,
const std::vector< float > &  input,
float  out 
)

Update measure of accuracy for model if we're using best model only

Definition at line 455 of file MultipleClassifiers.cc.

float MultipleClassifiers::variance ( const std::vector< float > &  input)

Calculate the variance of the model's predictions of continuous values

Definition at line 385 of file MultipleClassifiers.cc.


Member Data Documentation

Definition at line 69 of file MultipleClassifiers.hh.

std::vector<float> MultipleClassifiers::accuracy [private]

Definition at line 93 of file MultipleClassifiers.hh.

Definition at line 88 of file MultipleClassifiers.hh.

Definition at line 70 of file MultipleClassifiers.hh.

Definition at line 71 of file MultipleClassifiers.hh.

float MultipleClassifiers::expPct [private]

Definition at line 85 of file MultipleClassifiers.hh.

Definition at line 84 of file MultipleClassifiers.hh.

const float MultipleClassifiers::featRange [private]

Definition at line 89 of file MultipleClassifiers.hh.

const int MultipleClassifiers::freq [private]

Definition at line 83 of file MultipleClassifiers.hh.

const int MultipleClassifiers::id [private]

Definition at line 78 of file MultipleClassifiers.hh.

std::vector<std::map<float, float> > MultipleClassifiers::infos [private]

Definition at line 95 of file MultipleClassifiers.hh.

const int MultipleClassifiers::mode [private]

Definition at line 82 of file MultipleClassifiers.hh.

The ensemble of Classifier Models used.

Definition at line 74 of file MultipleClassifiers.hh.

const int MultipleClassifiers::modelType [private]

Definition at line 79 of file MultipleClassifiers.hh.

const int MultipleClassifiers::nModels [private]

Definition at line 81 of file MultipleClassifiers.hh.

Definition at line 94 of file MultipleClassifiers.hh.

Definition at line 68 of file MultipleClassifiers.hh.

const int MultipleClassifiers::predType [private]

Definition at line 80 of file MultipleClassifiers.hh.

Definition at line 91 of file MultipleClassifiers.hh.

Definition at line 67 of file MultipleClassifiers.hh.

Definition at line 87 of file MultipleClassifiers.hh.

const float MultipleClassifiers::treeThresh [private]

Definition at line 86 of file MultipleClassifiers.hh.


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


rl_agent
Author(s): Todd Hester
autogenerated on Thu Jun 6 2019 22:00:14