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

PLearn::FieldStat Class Reference

#include <SDBWithStats.h>

Collaboration diagram for PLearn::FieldStat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

int nsymbols ()
 FieldStat ()
int ntotal () const
int missing () const
int nonmissing () const
real mean () const
real stddev () const
real min () const
real max () const
void updateString (const string &sym)
void updateNumber (double d)
void updateMissing ()
void clear ()
 clear everything

void finalize ()
 computes final mean and stddev


Public Attributes

map< string, intsymbolcount
 For symbolic values.

map< string, intsymbolid
 an int between 1 and nsymbols associated to each symbol


Static Public Attributes

int max_nsymbols = 400
 stop remembering symbols above this number...


Protected Attributes

int nonmissing_
 number of entries with non missing value

int missing_
 number of entries with missing value

double sum_
 For numeric values:.

double sumsquare_
double min_
double max_
double mean_
double stddev_

Constructor & Destructor Documentation

PLearn::FieldStat::FieldStat  )  [inline]
 

Definition at line 85 of file SDBWithStats.h.

References max_, min_, missing_, nonmissing_, sum_, and sumsquare_.


Member Function Documentation

void PLearn::FieldStat::clear  ) 
 

clear everything

Definition at line 72 of file SDBWithStats.cc.

References max_, mean_, min_, missing_, nonmissing_, stddev_, sum_, sumsquare_, symbolcount, and symbolid.

Referenced by PLearn::SDBWithStats::forgetStats().

void PLearn::FieldStat::finalize  ) 
 

computes final mean and stddev

Definition at line 86 of file SDBWithStats.cc.

References max_nsymbols, mean_, nonmissing_, nsymbols(), PLearn::sqrt(), PLearn::square(), stddev_, sum_, sumsquare_, symbolcount, and symbolid.

real PLearn::FieldStat::max  )  const [inline]
 

Definition at line 96 of file SDBWithStats.h.

References max_.

Referenced by PLearn::SDBWithStats::saveStats().

real PLearn::FieldStat::mean  )  const [inline]
 

Definition at line 93 of file SDBWithStats.h.

References mean_.

Referenced by PLearn::SDBVMFieldNormalize::convertField(), and PLearn::SDBWithStats::saveStats().

real PLearn::FieldStat::min  )  const [inline]
 

Definition at line 95 of file SDBWithStats.h.

References min_.

Referenced by PLearn::SDBWithStats::saveStats().

int PLearn::FieldStat::missing  )  const [inline]
 

Definition at line 91 of file SDBWithStats.h.

References missing_.

Referenced by PLearn::SDBWithStats::saveStats().

int PLearn::FieldStat::nonmissing  )  const [inline]
 

Definition at line 92 of file SDBWithStats.h.

References nonmissing_.

Referenced by PLearn::SDBWithStats::saveStats().

int PLearn::FieldStat::nsymbols  )  [inline]
 

Definition at line 82 of file SDBWithStats.h.

References symbolcount.

Referenced by finalize(), PLearn::SDBWithStats::saveStats(), updateNumber(), and updateString().

int PLearn::FieldStat::ntotal  )  const [inline]
 

Definition at line 90 of file SDBWithStats.h.

References missing_, and nonmissing_.

real PLearn::FieldStat::stddev  )  const [inline]
 

Definition at line 94 of file SDBWithStats.h.

References stddev_.

Referenced by PLearn::SDBVMFieldDivSigma::convertField(), PLearn::SDBVMFieldNormalize::convertField(), and PLearn::SDBWithStats::saveStats().

void PLearn::FieldStat::updateMissing  )  [inline]
 

Definition at line 100 of file SDBWithStats.h.

References missing_.

void PLearn::FieldStat::updateNumber double  d  ) 
 

Definition at line 59 of file SDBWithStats.cc.

References max_, max_nsymbols, min_, nonmissing_, nsymbols(), sum_, sumsquare_, symbolcount, and PLearn::tostring().

void PLearn::FieldStat::updateString const string sym  ) 
 

Definition at line 52 of file SDBWithStats.cc.

References max_nsymbols, nonmissing_, nsymbols(), and symbolcount.


Member Data Documentation

double PLearn::FieldStat::max_ [protected]
 

Definition at line 73 of file SDBWithStats.h.

Referenced by clear(), FieldStat(), PLearn::SDBWithStats::loadStats(), max(), and updateNumber().

int PLearn::FieldStat::max_nsymbols = 400 [static]
 

stop remembering symbols above this number...

Definition at line 50 of file SDBWithStats.cc.

Referenced by finalize(), updateNumber(), and updateString().

double PLearn::FieldStat::mean_ [protected]
 

Definition at line 74 of file SDBWithStats.h.

Referenced by clear(), finalize(), PLearn::SDBWithStats::loadStats(), and mean().

double PLearn::FieldStat::min_ [protected]
 

Definition at line 72 of file SDBWithStats.h.

Referenced by clear(), FieldStat(), PLearn::SDBWithStats::loadStats(), min(), and updateNumber().

int PLearn::FieldStat::missing_ [protected]
 

number of entries with missing value

Definition at line 66 of file SDBWithStats.h.

Referenced by clear(), FieldStat(), PLearn::SDBWithStats::loadStats(), missing(), ntotal(), and updateMissing().

int PLearn::FieldStat::nonmissing_ [protected]
 

number of entries with non missing value

Definition at line 65 of file SDBWithStats.h.

Referenced by clear(), FieldStat(), finalize(), PLearn::SDBWithStats::loadStats(), nonmissing(), ntotal(), updateNumber(), and updateString().

double PLearn::FieldStat::stddev_ [protected]
 

Definition at line 75 of file SDBWithStats.h.

Referenced by clear(), finalize(), PLearn::SDBWithStats::loadStats(), and stddev().

double PLearn::FieldStat::sum_ [protected]
 

For numeric values:.

Definition at line 69 of file SDBWithStats.h.

Referenced by clear(), FieldStat(), finalize(), and updateNumber().

double PLearn::FieldStat::sumsquare_ [protected]
 

Definition at line 70 of file SDBWithStats.h.

Referenced by clear(), FieldStat(), finalize(), and updateNumber().

map<string,int> PLearn::FieldStat::symbolcount
 

For symbolic values.

Definition at line 80 of file SDBWithStats.h.

Referenced by clear(), finalize(), PLearn::SDBWithStats::loadStats(), nsymbols(), PLearn::SDBWithStats::saveStats(), updateNumber(), and updateString().

map<string,int> PLearn::FieldStat::symbolid [mutable]
 

an int between 1 and nsymbols associated to each symbol

Definition at line 81 of file SDBWithStats.h.

Referenced by clear(), finalize(), PLearn::SDBWithStats::loadStats(), PLearn::SDBVMFieldRemapReals::SDBVMFieldRemapReals(), and PLearn::SDBVMFieldRemapStrings::SDBVMFieldRemapStrings().


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