Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::ToBagSplitter Class Reference

#include <ToBagSplitter.h>

Inheritance diagram for PLearn::ToBagSplitter:

Inheritance graph
[legend]
Collaboration diagram for PLearn::ToBagSplitter:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Splitter inherited

Public Member Functions

 ToBagSplitter ()
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.

 PLEARN_DECLARE_OBJECT (ToBagSplitter)
 Declares name and deepCopy methods.

virtual void setDataSet (VMat the_dataset)
 Overridden.

virtual int nsplits () const
 Returns the number of available different "splits".

virtual int nSetsPerSplit () const
 Returns the number of sets per split.

virtual TVec< VMatgetSplit (int i=0)
 Returns split number i.


Public Attributes

int expected_size_of_bag
PP< Splittersub_splitter

Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Protected Attributes

VMat bags_index
 Used to store the list of all bags, with the indices of the corresponding rows in the dataset.


Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef Splitter PLearn::ToBagSplitter::inherited
 

Reimplemented from PLearn::Splitter.

Definition at line 57 of file ToBagSplitter.h.


Constructor & Destructor Documentation

PLearn::ToBagSplitter::ToBagSplitter  ) 
 

Definition at line 54 of file ToBagSplitter.cc.


Member Function Documentation

void PLearn::ToBagSplitter::build  )  [virtual]
 

Should call simply inherited::build(), then this class's build_().

This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::Object.

Definition at line 82 of file ToBagSplitter.cc.

References build_().

Referenced by setDataSet().

void PLearn::ToBagSplitter::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 91 of file ToBagSplitter.cc.

References bags_index, expected_size_of_bag, PLearn::TMat< T >::length(), PLearn::VMat::length(), PLearn::Mat, PLERROR, PLearn::TMat< T >::resize(), sub_splitter, and PLearn::TMat< T >::width().

Referenced by build().

void PLearn::ToBagSplitter::declareOptions OptionList ol  )  [static, protected]
 

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 67 of file ToBagSplitter.cc.

References PLearn::declareOption(), and PLearn::OptionList.

TVec< VMat > PLearn::ToBagSplitter::getSplit int  i = 0  )  [virtual]
 

Returns split number i.

Implements PLearn::Splitter.

Definition at line 138 of file ToBagSplitter.cc.

References PLearn::TVec< T >::append(), k, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), sub_splitter, and PLearn::TVec< T >::toMat().

void PLearn::ToBagSplitter::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Splitter.

Definition at line 162 of file ToBagSplitter.cc.

References PLERROR.

int PLearn::ToBagSplitter::nSetsPerSplit  )  const [virtual]
 

Returns the number of sets per split.

Implements PLearn::Splitter.

Definition at line 179 of file ToBagSplitter.cc.

References sub_splitter.

int PLearn::ToBagSplitter::nsplits  )  const [virtual]
 

Returns the number of available different "splits".

Implements PLearn::Splitter.

Definition at line 188 of file ToBagSplitter.cc.

References sub_splitter.

PLearn::ToBagSplitter::PLEARN_DECLARE_OBJECT ToBagSplitter   ) 
 

Declares name and deepCopy methods.

void PLearn::ToBagSplitter::setDataSet VMat  the_dataset  )  [virtual]
 

Overridden.

Reimplemented from PLearn::Splitter.

Definition at line 196 of file ToBagSplitter.cc.

References build().


Member Data Documentation

VMat PLearn::ToBagSplitter::bags_index [protected]
 

Used to store the list of all bags, with the indices of the corresponding rows in the dataset.

Definition at line 72 of file ToBagSplitter.h.

Referenced by build_().

int PLearn::ToBagSplitter::expected_size_of_bag
 

Definition at line 80 of file ToBagSplitter.h.

Referenced by build_().

PP<Splitter> PLearn::ToBagSplitter::sub_splitter
 

Definition at line 81 of file ToBagSplitter.h.

Referenced by build_(), getSplit(), nSetsPerSplit(), and nsplits().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:26:52 2004 for PLearn by doxygen 1.3.7