Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

CLUS::BinaryMultiClassificationSplitter Class Reference

#include <binarymulticlassificationsplitter.h>

Collaboration diagram for CLUS::BinaryMultiClassificationSplitter:

Collaboration graph
[legend]

Public Member Functions

 BinaryMultiClassificationSplitter (const Vector< int > &DDomainSize, int CsplitDim, int NoDatasets, DiscretePermutationTransformation &DiscreteTransformer, ContinuousLinearTransformation &ContinuousTransformer)
 ~BinaryMultiClassificationSplitter (void)
void setNodeID (int ID)
bool GotNoData (void)
int GetCSplitDim (void)
int GetDSplitDim (void)
int GetNoDatasets (void)
const Vector< int > & GetDDomainSize (void)
double getLabeledCount (int attribute, int dataSetIndex, bool b)
DiscretePermutationTransformationGetDiscreteTransformer (void)
ContinuousLinearTransformationGetContinuousTransformer (void)
void InitializeSplitStatistics (void)
 Initializes the datastructures used in split variable selection.

int ChooseBranch (const int *Dvars, const double *Cvars)
 Choose a branch.

void UpdateSplitStatistics (const int *Dvars, const double *Cvars, int classLabel, int datasetNo)
 Update split stats with new data.

bool labeledMeansSignificant (int attribute, int dataSetIndex)
bool negMeanLessThanPos (int attribute, int dataSetIndex)
bool hasContinuousData (int attribute, int dataSetIndex)
void DeleteTemporaryStatistics (void)
bool ComputeSplitVariable (list< int > &attList)
 Computes the split variable.

Permutation ComputeDiscreteShift (bool label, int attribute, int datasetIndex)
void AddDiscreteShiftStatistics (int SplitAttribute, double weight, Vector< BinomialStatistics > &statistics)
void ComputeCenter (void)
double getLabeledCenter (int attribute, int dataSetIndex, bool b)
double getLabeledCenterVariance (int attribute, int dataSetIndex, bool b)
double getVariance (int attribute, int dataSetIndex)
double getSplitVariance (int attribute, int dataSetIndex)
 For continuous attributes only.

double getTentativeSplitPoint (int attribute, int dataSetIndex)
 For continuous attributes not chosen as split attribute at current node.

double getTentativeCenter (int attribute, int dataSetIndex)
void ComputeSplitPoint (void)
int ComputeClassLabel (void)
double getContinuousShift (int attribute, int dataSetIndex)
bool MoreSplits (int min_no_datapoints, int nodeID)
void SaveToStream (ostream &out, bool isLeaf)

Private Attributes

int dsplitDim
 number of discrete split variables

int csplitDim
 number of continuous split variables

int id
 id of owner node

bool noWeighting
int noDatasets
const Vector< int > & dDomainSize
int SplitVariable
 indicates on what variable this node splits on

double splitPoint
Vector< int > SeparatingSet
 The list of values for the left child for the separating variable if the split is not oblique.

DiscretePermutationTransformationdiscreteTransformer
ContinuousLinearTransformationcontinuousTransformer
Vector< Vector< BinomialStatistics > > discreteStatistics
 Statistics for split decision.

Vector< Vector< NormalStatistics > > continuousStatistics
Vector< Vector< Permutation > > discreteShifts
 one per attribute

Vector< Vector< double > > continuousShifts
 one per attribute

Vector< int > examplesSeen
Vector< int > examples0Seen
int count
 statistics for class label determination

int countC0

Constructor & Destructor Documentation

CLUS::BinaryMultiClassificationSplitter::BinaryMultiClassificationSplitter const Vector< int > &  DDomainSize,
int  CsplitDim,
int  NoDatasets,
DiscretePermutationTransformation DiscreteTransformer,
ContinuousLinearTransformation ContinuousTransformer
[inline]
 

Definition at line 96 of file binarymulticlassificationsplitter.h.

CLUS::BinaryMultiClassificationSplitter::~BinaryMultiClassificationSplitter void   )  [inline]
 

Definition at line 108 of file binarymulticlassificationsplitter.h.


Member Function Documentation

void CLUS::BinaryMultiClassificationSplitter::AddDiscreteShiftStatistics int  SplitAttribute,
double  weight,
Vector< BinomialStatistics > &  statistics
[inline]
 

Definition at line 429 of file binarymulticlassificationsplitter.h.

int CLUS::BinaryMultiClassificationSplitter::ChooseBranch const int *  Dvars,
const double *  Cvars
[inline]
 

Choose a branch.

Parameters:
Dvars discrete variables
Cvars continuous variables
Returns:
0 is left and 1 right

Definition at line 201 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::ComputeCenter void   )  [inline]
 

Definition at line 451 of file binarymulticlassificationsplitter.h.

int CLUS::BinaryMultiClassificationSplitter::ComputeClassLabel void   )  [inline]
 

Definition at line 576 of file binarymulticlassificationsplitter.h.

Referenced by SaveToStream().

Permutation CLUS::BinaryMultiClassificationSplitter::ComputeDiscreteShift bool  label,
int  attribute,
int  datasetIndex
[inline]
 

Definition at line 421 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::ComputeSplitPoint void   )  [inline]
 

Definition at line 538 of file binarymulticlassificationsplitter.h.

bool CLUS::BinaryMultiClassificationSplitter::ComputeSplitVariable list< int > &  attList  )  [inline]
 

Computes the split variable.

If the variable needs a shift (doesn't have one already) add the variable to the attList

Parameters:
attList list of attribute values
Returns:
If not enough data return false: make node a leaf

Definition at line 307 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::DeleteTemporaryStatistics void   )  [inline]
 

Definition at line 295 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getContinuousShift int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 584 of file binarymulticlassificationsplitter.h.

ContinuousLinearTransformation& CLUS::BinaryMultiClassificationSplitter::GetContinuousTransformer void   )  [inline]
 

Definition at line 153 of file binarymulticlassificationsplitter.h.

int CLUS::BinaryMultiClassificationSplitter::GetCSplitDim void   )  [inline]
 

Definition at line 120 of file binarymulticlassificationsplitter.h.

const Vector<int>& CLUS::BinaryMultiClassificationSplitter::GetDDomainSize void   )  [inline]
 

Definition at line 135 of file binarymulticlassificationsplitter.h.

DiscretePermutationTransformation& CLUS::BinaryMultiClassificationSplitter::GetDiscreteTransformer void   )  [inline]
 

Definition at line 148 of file binarymulticlassificationsplitter.h.

int CLUS::BinaryMultiClassificationSplitter::GetDSplitDim void   )  [inline]
 

Definition at line 125 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getLabeledCenter int  attribute,
int  dataSetIndex,
bool  b
[inline]
 

Definition at line 492 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getLabeledCenterVariance int  attribute,
int  dataSetIndex,
bool  b
[inline]
 

Definition at line 497 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getLabeledCount int  attribute,
int  dataSetIndex,
bool  b
[inline]
 

Definition at line 140 of file binarymulticlassificationsplitter.h.

int CLUS::BinaryMultiClassificationSplitter::GetNoDatasets void   )  [inline]
 

Definition at line 130 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getSplitVariance int  attribute,
int  dataSetIndex
[inline]
 

For continuous attributes only.

Parameters:
attribute 
dataSetIndex 

Definition at line 511 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getTentativeCenter int  attribute,
int  dataSetIndex
[inline]
 

Parameters:
attribute 
dataSetIndex 

Definition at line 532 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getTentativeSplitPoint int  attribute,
int  dataSetIndex
[inline]
 

For continuous attributes not chosen as split attribute at current node.

Parameters:
attribute 
dataSetIndex 

Definition at line 522 of file binarymulticlassificationsplitter.h.

double CLUS::BinaryMultiClassificationSplitter::getVariance int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 502 of file binarymulticlassificationsplitter.h.

bool CLUS::BinaryMultiClassificationSplitter::GotNoData void   )  [inline]
 

Definition at line 115 of file binarymulticlassificationsplitter.h.

bool CLUS::BinaryMultiClassificationSplitter::hasContinuousData int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 290 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::InitializeSplitStatistics void   )  [inline]
 

Initializes the datastructures used in split variable selection.

Definition at line 159 of file binarymulticlassificationsplitter.h.

bool CLUS::BinaryMultiClassificationSplitter::labeledMeansSignificant int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 280 of file binarymulticlassificationsplitter.h.

bool CLUS::BinaryMultiClassificationSplitter::MoreSplits int  min_no_datapoints,
int  nodeID
[inline]
 

Definition at line 589 of file binarymulticlassificationsplitter.h.

bool CLUS::BinaryMultiClassificationSplitter::negMeanLessThanPos int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 285 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::SaveToStream ostream &  out,
bool  isLeaf
[inline]
 

Definition at line 595 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::setNodeID int  ID  )  [inline]
 

Definition at line 110 of file binarymulticlassificationsplitter.h.

void CLUS::BinaryMultiClassificationSplitter::UpdateSplitStatistics const int *  Dvars,
const double *  Cvars,
int  classLabel,
int  datasetNo
[inline]
 

Update split stats with new data.

Parameters:
Dvars discrete variables
Cvars continuous variables
classLabel classification label
datasetNo dataset number

Definition at line 249 of file binarymulticlassificationsplitter.h.


Field Documentation

Vector< Vector<double> > CLUS::BinaryMultiClassificationSplitter::continuousShifts [private]
 

one per attribute

Definition at line 86 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter().

Vector< Vector<NormalStatistics> > CLUS::BinaryMultiClassificationSplitter::continuousStatistics [private]
 

Definition at line 80 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), ComputeCenter(), ComputeSplitPoint(), ComputeSplitVariable(), getLabeledCenter(), getLabeledCenterVariance(), getLabeledCount(), getSplitVariance(), getTentativeCenter(), getTentativeSplitPoint(), getVariance(), hasContinuousData(), InitializeSplitStatistics(), labeledMeansSignificant(), negMeanLessThanPos(), and UpdateSplitStatistics().

ContinuousLinearTransformation& CLUS::BinaryMultiClassificationSplitter::continuousTransformer [private]
 

Definition at line 73 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), ComputeCenter(), ComputeSplitPoint(), ComputeSplitVariable(), getContinuousShift(), GetContinuousTransformer(), InitializeSplitStatistics(), and UpdateSplitStatistics().

int CLUS::BinaryMultiClassificationSplitter::count [private]
 

statistics for class label determination

Definition at line 92 of file binarymulticlassificationsplitter.h.

Referenced by ComputeClassLabel(), ComputeSplitVariable(), GotNoData(), InitializeSplitStatistics(), MoreSplits(), and UpdateSplitStatistics().

int CLUS::BinaryMultiClassificationSplitter::countC0 [private]
 

Definition at line 93 of file binarymulticlassificationsplitter.h.

Referenced by ComputeClassLabel(), ComputeSplitVariable(), InitializeSplitStatistics(), MoreSplits(), and UpdateSplitStatistics().

int CLUS::BinaryMultiClassificationSplitter::csplitDim [private]
 

number of continuous split variables

Definition at line 50 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), ComputeSplitVariable(), GetCSplitDim(), InitializeSplitStatistics(), and UpdateSplitStatistics().

const Vector<int>& CLUS::BinaryMultiClassificationSplitter::dDomainSize [private]
 

Definition at line 59 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), GetDDomainSize(), and InitializeSplitStatistics().

Vector< Vector<Permutation> > CLUS::BinaryMultiClassificationSplitter::discreteShifts [private]
 

one per attribute

Definition at line 83 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter().

Vector< Vector<BinomialStatistics> > CLUS::BinaryMultiClassificationSplitter::discreteStatistics [private]
 

Statistics for split decision.

One for each attributeXdataset If an attribute already has the shift determined keep statistics about all datasets in the location for the first dataset

Definition at line 79 of file binarymulticlassificationsplitter.h.

Referenced by AddDiscreteShiftStatistics(), BinaryMultiClassificationSplitter(), ComputeCenter(), ComputeDiscreteShift(), ComputeSplitPoint(), ComputeSplitVariable(), InitializeSplitStatistics(), and UpdateSplitStatistics().

DiscretePermutationTransformation& CLUS::BinaryMultiClassificationSplitter::discreteTransformer [private]
 

Definition at line 72 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), ComputeCenter(), ComputeSplitPoint(), ComputeSplitVariable(), GetDiscreteTransformer(), InitializeSplitStatistics(), and UpdateSplitStatistics().

int CLUS::BinaryMultiClassificationSplitter::dsplitDim [private]
 

number of discrete split variables

Definition at line 47 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), ComputeSplitVariable(), GetDSplitDim(), InitializeSplitStatistics(), and UpdateSplitStatistics().

Vector<int> CLUS::BinaryMultiClassificationSplitter::examples0Seen [private]
 

Definition at line 89 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), and UpdateSplitStatistics().

Vector<int> CLUS::BinaryMultiClassificationSplitter::examplesSeen [private]
 

Definition at line 88 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), and UpdateSplitStatistics().

int CLUS::BinaryMultiClassificationSplitter::id [private]
 

id of owner node

Definition at line 53 of file binarymulticlassificationsplitter.h.

Referenced by ComputeSplitVariable(), and setNodeID().

int CLUS::BinaryMultiClassificationSplitter::noDatasets [private]
 

Definition at line 57 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), ComputeCenter(), ComputeSplitPoint(), ComputeSplitVariable(), GetNoDatasets(), InitializeSplitStatistics(), and SaveToStream().

bool CLUS::BinaryMultiClassificationSplitter::noWeighting [private]
 

Definition at line 55 of file binarymulticlassificationsplitter.h.

Referenced by BinaryMultiClassificationSplitter(), and getSplitVariance().

Vector<int> CLUS::BinaryMultiClassificationSplitter::SeparatingSet [private]
 

The list of values for the left child for the separating variable if the split is not oblique.

Contains values in order so that binary search can be used.

Definition at line 70 of file binarymulticlassificationsplitter.h.

Referenced by ChooseBranch(), ComputeCenter(), ComputeSplitPoint(), MoreSplits(), and SaveToStream().

double CLUS::BinaryMultiClassificationSplitter::splitPoint [private]
 

Definition at line 65 of file binarymulticlassificationsplitter.h.

Referenced by ChooseBranch(), ComputeCenter(), ComputeSplitPoint(), and SaveToStream().

int CLUS::BinaryMultiClassificationSplitter::SplitVariable [private]
 

indicates on what variable this node splits on

Definition at line 62 of file binarymulticlassificationsplitter.h.

Referenced by ChooseBranch(), ComputeCenter(), ComputeSplitPoint(), ComputeSplitVariable(), MoreSplits(), and SaveToStream().


The documentation for this class was generated from the following file:
Generated on Mon Jul 21 16:57:44 2003 for SECRET by doxygen 1.3.2