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

CLUS::BinarySplitter Class Reference

Base class for all the splitters. More...

#include <binarysplitter.h>

Inheritance diagram for CLUS::BinarySplitter:

Inheritance graph
[legend]

Public Member Functions

 BinarySplitter ()
 BinarySplitter (const Vector< int > &DDomainSize, int CsplitDim, int RegDim)
 BinarySplitter (BinarySplitter &aux)
int GetRegDim (void)
int GetCSplitDim (void)
int GetDSplitDim (void)
const Vector< int > & GetDDomainSize (void)
int ChooseBranch (const int *Dvars, const double *Cvars)
 Decides what branch to choose.

double ProbabilityFirstBranch (const int *Dvars, const double *Cvars)
 Computes probability to take first branch.

void InitializeSplitStatistics (void)
 Initializes the data structures used in split variable selection.

void UpdateSplitStatistics (const int *Dvars, const double *Cvars, double p1, double p2)
 Updates the necessary statistics for split variable selection.

int ComputeSplitVariable (int type)
 Decides on a split variable and frees the data structures used in split selection.

bool MoreSplits (int branch, int Min_no_datapoints)
 Ask if it is worth doing more splits in the future.

void DeleteTemporaryStatistics (void)
 Cleans up all the unnecessary statistics after the decision has been made.

void SaveToStream (ostream &out)
 ~BinarySplitter (void)

Protected Attributes

int dsplitDim
 the number of discrete split variables (nonregressers)

int csplitDim
 the number of continuous split variables (nonregressoers)

int regDim
 the number of regressors

const Vector< int > & dDomainSize
 list of discrete domain sizes

int SplitVariable
 Indicates on what variable this node splits on.

Vector< double > SeparatingHyperplane
 Contains the coeficients of the hyperplane that separates the 2 distributions in the input space.

Vector< double > splitSetProbability
 Contains the probability for a value to be in the left partition.


Detailed Description

Base class for all the splitters.

Specifies the interface

Definition at line 48 of file binarysplitter.h.


Constructor & Destructor Documentation

CLUS::BinarySplitter::BinarySplitter  )  [inline]
 

Definition at line 76 of file binarysplitter.h.

CLUS::BinarySplitter::BinarySplitter const Vector< int > &  DDomainSize,
int  CsplitDim,
int  RegDim
[inline]
 

Definition at line 79 of file binarysplitter.h.

CLUS::BinarySplitter::BinarySplitter BinarySplitter aux  )  [inline]
 

Definition at line 85 of file binarysplitter.h.

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

Definition at line 175 of file binarysplitter.h.


Member Function Documentation

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

Decides what branch to choose.

Reimplemented in CLUS::BinaryObliqueSplitter.

Definition at line 111 of file binarysplitter.h.

Referenced by ProbabilityFirstBranch().

int CLUS::BinarySplitter::ComputeSplitVariable int  type  )  [inline]
 

Decides on a split variable and frees the data structures used in split selection.

Returns:
0 if a split variable could be computed, -1 otherwise.

Reimplemented in CLUS::BinaryObliqueSplitter.

Definition at line 134 of file binarysplitter.h.

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

Cleans up all the unnecessary statistics after the decision has been made.

Reimplemented in CLUS::BinaryObliqueSplitter.

Definition at line 146 of file binarysplitter.h.

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

Definition at line 95 of file binarysplitter.h.

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

Definition at line 105 of file binarysplitter.h.

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

Definition at line 100 of file binarysplitter.h.

int CLUS::BinarySplitter::GetRegDim void   )  [inline]
 

Definition at line 91 of file binarysplitter.h.

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

Initializes the data structures used in split variable selection.

Reimplemented in CLUS::BinaryObliqueSplitter.

Definition at line 125 of file binarysplitter.h.

bool CLUS::BinarySplitter::MoreSplits int  branch,
int  Min_no_datapoints
[inline]
 

Ask if it is worth doing more splits in the future.

Reimplemented in CLUS::BinaryObliqueSplitter.

Definition at line 140 of file binarysplitter.h.

double CLUS::BinarySplitter::ProbabilityFirstBranch const int *  Dvars,
const double *  Cvars
[inline]
 

Computes probability to take first branch.

Need this to accomodate probabilistic splitters

Definition at line 116 of file binarysplitter.h.

void CLUS::BinarySplitter::SaveToStream ostream &  out  )  [inline]
 

Definition at line 149 of file binarysplitter.h.

void CLUS::BinarySplitter::UpdateSplitStatistics const int *  Dvars,
const double *  Cvars,
double  p1,
double  p2
[inline]
 

Updates the necessary statistics for split variable selection.

Definition at line 129 of file binarysplitter.h.


Field Documentation

int CLUS::BinarySplitter::csplitDim [protected]
 

the number of continuous split variables (nonregressoers)

Definition at line 55 of file binarysplitter.h.

Referenced by BinarySplitter(), GetCSplitDim(), CLUS::BinaryObliqueSplitter::InitializeSplitStatistics(), and CLUS::BinaryObliqueSplitter::ProbabilityLeftPrivate().

const Vector<int>& CLUS::BinarySplitter::dDomainSize [protected]
 

list of discrete domain sizes

Definition at line 61 of file binarysplitter.h.

Referenced by BinarySplitter(), GetDDomainSize(), and CLUS::BinaryObliqueSplitter::InitializeSplitStatistics().

int CLUS::BinarySplitter::dsplitDim [protected]
 

the number of discrete split variables (nonregressers)

Definition at line 52 of file binarysplitter.h.

Referenced by BinarySplitter(), CLUS::BinaryObliqueSplitter::ComputeSplitVariable(), GetDSplitDim(), CLUS::BinaryObliqueSplitter::InitializeSplitStatistics(), and CLUS::BinaryObliqueSplitter::UpdateSplitStatistics().

int CLUS::BinarySplitter::regDim [protected]
 

the number of regressors

Definition at line 58 of file binarysplitter.h.

Referenced by BinarySplitter(), GetRegDim(), CLUS::BinaryObliqueSplitter::InitializeSplitStatistics(), and CLUS::BinaryObliqueSplitter::ProbabilityLeftPrivate().

Vector<double> CLUS::BinarySplitter::SeparatingHyperplane [protected]
 

Contains the coeficients of the hyperplane that separates the 2 distributions in the input space.

This is an oblique split

Definition at line 69 of file binarysplitter.h.

Referenced by BinarySplitter(), CLUS::BinaryObliqueSplitter::ComputeSplitVariable(), CLUS::BinaryObliqueSplitter::ProbabilityLeftPrivate(), and SaveToStream().

Vector<double> CLUS::BinarySplitter::splitSetProbability [protected]
 

Contains the probability for a value to be in the left partition.

In traditional classifiers is set to 1.0 or 0.0

Definition at line 73 of file binarysplitter.h.

Referenced by BinarySplitter(), CLUS::BinaryObliqueSplitter::ComputeSplitVariable(), CLUS::BinaryObliqueSplitter::ProbabilityLeftPrivate(), and SaveToStream().

int CLUS::BinarySplitter::SplitVariable [protected]
 

Indicates on what variable this node splits on.

If -1 we have an oblique split.

Definition at line 65 of file binarysplitter.h.

Referenced by CLUS::BinaryObliqueSplitter::ComputeSplitVariable(), CLUS::BinaryObliqueSplitter::ProbabilityLeftPrivate(), and SaveToStream().


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