Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GroupSetWinnow Class Reference

A Winnow class with a Group set. More...

#include <GroupSetWinnow.h>

Inheritance diagram for GroupSetWinnow:

Winnow< Example > Neuron< Example > GroupSetSoftMarginWinnow List of all members.

Public Member Functions

virtual long double GetInput (const Example &x, long long int inp)
 Get an example's input to an input of Winnow.

 GroupSetWinnow (GroupSet *grpst, Example *trainexs=NULL, long numex=0, unsigned dmode=HALFHAUSDORFF, unsigned storemd=STOREWEIGHTS|STOREERRORS)
 ~GroupSetWinnow ()
long double Sum (const Example &x, long exindex)
 Compute the weighted sum for an example if it is used to build the group set.

long double Sum (const Example &x)
 Compute the weighted sum for an example.

void SetUnitGroup ()
 Set IsUnitGroup as true.

void PreCompExInputs (Example &x)
 Pre-compute the inputs of an example.


Protected Member Functions

virtual long double GetInputConstant (long long int inp)
 Return the number of boxes for a group.


Protected Attributes

GroupSetgrpset
 a group set

unsigned distmode
 the distance mode: Full-Hausdorff or Half-Hausdorff

unsigned IsExInBuildingPtSet
 A indicator for current example.

long curExIndex
 the index of current input example

long long int lastInputIndex
 the input index called by GetInput() last time.

long double lastContain
 0 or 1 if the last group contains the example,

bool IsUnitGroup
 if the number of boxes is not considered


Detailed Description

A Winnow class with a Group set.

Full-Hausdorff: the number of inputs = 2*# of Groups. Half-Hausdorff: the number of inputs = # of Groups.


Constructor & Destructor Documentation

GroupSetWinnow::GroupSetWinnow GroupSet   grpst,
Example   trainexs = NULL,
long    numex = 0,
unsigned    dmode = HALFHAUSDORFF,
unsigned    storemd = STOREWEIGHTS|STOREERRORS
 

GroupSetWinnow::~GroupSetWinnow  
 


Member Function Documentation

long double GroupSetWinnow::GetInput const Example   x,
long long int    inp
[virtual]
 

Get an example's input to an input of Winnow.

For Full-Hausdorff, check lastinput. If they are in the same pair, ~lastcontain. If IsExInBuildingPtSet == 1, check if the example is in the point set of the group. Otherwise, check if minimum bounding box built by each point in the example and the group is valid.

Implements Neuron< Example >.

long double GroupSetWinnow::GetInputConstant long long int    inp [protected, virtual]
 

Return the number of boxes for a group.

Reimplemented from Neuron< Example >.

void GroupSetWinnow::PreCompExInputs Example   x
 

Pre-compute the inputs of an example.

The result will be stored at x.inputs as a bitstring.

Parameters:
x an example

void GroupSetWinnow::SetUnitGroup   [inline]
 

Set IsUnitGroup as true.

long double GroupSetWinnow::Sum const Example   x [inline]
 

Compute the weighted sum for an example.

Parameters:
x an example

Reimplemented from Neuron< Example >.

long double GroupSetWinnow::Sum const Example   x,
long    exindex
 

Compute the weighted sum for an example if it is used to build the group set.

Will set IsExInBuildingPtSet to 1 first, then set it back to 0.

Parameters:
x an example
exindex an index of x


Member Data Documentation

long GroupSetWinnow::curExIndex [protected]
 

the index of current input example

unsigned GroupSetWinnow::distmode [protected]
 

the distance mode: Full-Hausdorff or Half-Hausdorff

GroupSet* GroupSetWinnow::grpset [protected]
 

a group set

unsigned GroupSetWinnow::IsExInBuildingPtSet [protected]
 

A indicator for current example.

1: the example is in the point set used to build the group set. Otherwise 0.

bool GroupSetWinnow::IsUnitGroup [protected]
 

if the number of boxes is not considered

long double GroupSetWinnow::lastContain [protected]
 

0 or 1 if the last group contains the example,

See also:
lastInputIndex.

long long int GroupSetWinnow::lastInputIndex [protected]
 

the input index called by GetInput() last time.

if Full-Hausdorff, a paire of inputs only need to be computed once. if -1, never been used.


The documentation for this class was generated from the following files:
Generated on Tue Nov 11 12:13:29 2003 for Multi-instance Learning Using Winnow & Boxes by doxygen1.3-rc3