|
PLearn 0.1
|
#include <StatsIterator.h>


Public Member Functions | |
| virtual bool | requiresMultiplePasses () |
| Should return true if several passes are required (default version returns false) | |
| virtual void | init (int inputsize)=0 |
| Call this method once with the correct inputsize. | |
| virtual void | update (const Vec &input)=0 |
| Then iterate over the data set and call this method for each row. | |
| virtual void | update (const Mat &inputs) |
| virtual bool | finish ()=0 |
| virtual Vec | getResult () |
| You can call this method after finish has returned true. | |
| virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
| Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be. | |
| virtual StatsIterator * | deepCopy (CopiesMap &copies) const |
| virtual void | build () |
| Post-constructor. | |
| virtual void | oldwrite (ostream &out) const |
Static Public Member Functions | |
| static string | _classname_ () |
| static OptionList & | _getOptionList_ () |
| static RemoteMethodMap & | _getRemoteMethodMap_ () |
| static bool | _isa_ (const Object *o) |
| static void | _static_initialize_ () |
| static const PPath & | declaringFile () |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
| static void | declareOptions (OptionList &ol) |
| Declare options (data fields) for the class. | |
Protected Attributes | |
| Vec | result |
Private Types | |
| typedef Object | inherited |
Definition at line 58 of file StatsIterator.h.
typedef Object PLearn::StatsIterator::inherited [private] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 60 of file StatsIterator.h.
| string PLearn::StatsIterator::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 52 of file StatsIterator.cc.
| OptionList & PLearn::StatsIterator::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 52 of file StatsIterator.cc.
| RemoteMethodMap & PLearn::StatsIterator::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 52 of file StatsIterator.cc.
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 52 of file StatsIterator.cc.
| StaticInitializer StatsIterator::_static_initializer_ & PLearn::StatsIterator::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 52 of file StatsIterator.cc.
| virtual void PLearn::StatsIterator::build | ( | ) | [inline, virtual] |
Post-constructor.
The normal implementation 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 97 of file StatsIterator.h.
{}
| void PLearn::StatsIterator::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declare options (data fields) for the class.
Redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options). Please call the inherited method AT THE END to get the options listed in a consistent order (from most recently defined to least recently defined).
static void MyDerivedClass::declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "The size of the input; it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "The learned model weights"); inherited::declareOptions(ol); }
| ol | List of options that is progressively being constructed for the current class. |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 63 of file StatsIterator.cc.
References PLearn::declareOption(), PLearn::OptionBase::learntoption, and result.
Referenced by PLearn::QuantilesStatsIterator::declareOptions(), and PLearn::LiftStatsIterator::declareOptions().
{
declareOption(ol, "result", &StatsIterator::result, OptionBase::learntoption,
" result\n");
inherited::declareOptions(ol);
}


| static const PPath& PLearn::StatsIterator::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 95 of file StatsIterator.h.
{}
| StatsIterator * PLearn::StatsIterator::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 52 of file StatsIterator.cc.
| virtual bool PLearn::StatsIterator::finish | ( | ) | [pure virtual] |
Call this method when all the data has been shown (through update) If the method returns false, then a further pass through the data is required.
Implemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
| Vec PLearn::StatsIterator::getResult | ( | ) | [virtual] |
You can call this method after finish has returned true.
Definition at line 61 of file StatsIterator.cc.
{ return result; }
| virtual void PLearn::StatsIterator::init | ( | int | inputsize | ) | [pure virtual] |
Call this method once with the correct inputsize.
Implemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
| void PLearn::StatsIterator::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be.
This needs to be overridden by every class that adds "complex" data members to the class, such as Vec, Mat, PP<Something>, etc. Typical implementation:
void CLASS_OF_THIS::makeDeepCopyFromShallowCopy(CopiesMap& copies) { inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField(complex_data_member1, copies); deepCopyField(complex_data_member2, copies); ... }
| copies | A map used by the deep-copy mechanism to keep track of already-copied objects. |
Reimplemented from PLearn::Object.
Reimplemented in PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 53 of file StatsIterator.cc.
References PLearn::deepCopyField().
Referenced by PLearn::LiftStatsIterator::makeDeepCopyFromShallowCopy().
{
inherited::makeDeepCopyFromShallowCopy(copies);
deepCopyField(result, copies);
}


| void PLearn::StatsIterator::oldwrite | ( | ostream & | out | ) | const [virtual] |
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 71 of file StatsIterator.cc.
References PLearn::writeField(), PLearn::writeFooter(), and PLearn::writeHeader().
{
writeHeader(out,"StatsIterator");
//inherited::write(out);
writeField(out,"result",result);
writeFooter(out,"StatsIterator");
}

| bool PLearn::StatsIterator::requiresMultiplePasses | ( | ) | [virtual] |
Should return true if several passes are required (default version returns false)
Definition at line 59 of file StatsIterator.cc.
{ return false; }
| virtual void PLearn::StatsIterator::update | ( | const Mat & | inputs | ) | [inline, virtual] |
Definition at line 76 of file StatsIterator.h.
References i, PLearn::TMat< T >::length(), and PLearn::update().

| virtual void PLearn::StatsIterator::update | ( | const Vec & | input | ) | [pure virtual] |
Then iterate over the data set and call this method for each row.
Implemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Reimplemented from PLearn::Object.
Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.
Definition at line 95 of file StatsIterator.h.
Vec PLearn::StatsIterator::result [protected] |
Definition at line 63 of file StatsIterator.h.
Referenced by declareOptions(), PLearn::QuantilesStatsIterator::finish(), PLearn::LiftStatsIterator::finish(), PLearn::QuantilesStatsIterator::init(), and PLearn::LiftStatsIterator::init().
1.7.4