PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <ShiftAndRescaleFeatureRealFunction.h>
Public Member Functions | |
ShiftAndRescaleFeatureRealFunction (int featurenum=-1, real the_shift=0, real the_scale=1, real the_value_for_missing=MISSING_VALUE) | |
virtual real | evaluateFeature (real x) const |
This should be implemented in subclasses default verison returns the value of the feature unaltered. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual ShiftAndRescaleFeatureRealFunction * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
Static Public Member Functions | |
static string | _classname_ () |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Public Attributes | |
real | shift |
real | scale |
real | value_for_missing |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares the class options. | |
Private Types | |
typedef RealFunctionOfInputFeature | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
The first sentence should be a BRIEF DESCRIPTION of what the class does.
Place the rest of the class programmer documentation here. Doxygen supports Javadoc-style comments. See http://www.doxygen.org/manual.html
Definition at line 57 of file ShiftAndRescaleFeatureRealFunction.h.
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 59 of file ShiftAndRescaleFeatureRealFunction.h.
PLearn::ShiftAndRescaleFeatureRealFunction::ShiftAndRescaleFeatureRealFunction | ( | int | featurenum = -1 , |
real | the_shift = 0 , |
||
real | the_scale = 1 , |
||
real | the_value_for_missing = MISSING_VALUE |
||
) | [inline] |
Definition at line 71 of file ShiftAndRescaleFeatureRealFunction.h.
:inherited(featurenum), shift(the_shift), scale(the_scale), value_for_missing(the_value_for_missing) {}
string PLearn::ShiftAndRescaleFeatureRealFunction::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
OptionList & PLearn::ShiftAndRescaleFeatureRealFunction::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
RemoteMethodMap & PLearn::ShiftAndRescaleFeatureRealFunction::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
Object * PLearn::ShiftAndRescaleFeatureRealFunction::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
StaticInitializer ShiftAndRescaleFeatureRealFunction::_static_initializer_ & PLearn::ShiftAndRescaleFeatureRealFunction::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
void PLearn::ShiftAndRescaleFeatureRealFunction::build | ( | ) | [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::RealFunctionOfInputFeature.
Definition at line 52 of file ShiftAndRescaleFeatureRealFunction.cc.
{ inherited::build(); build_(); }
void PLearn::ShiftAndRescaleFeatureRealFunction::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 97 of file ShiftAndRescaleFeatureRealFunction.cc.
{}
string PLearn::ShiftAndRescaleFeatureRealFunction::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
void PLearn::ShiftAndRescaleFeatureRealFunction::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 63 of file ShiftAndRescaleFeatureRealFunction.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), scale, shift, and value_for_missing.
{ // ### Declare all of this object's options here. // ### For the "flags" of each option, you should typically specify // ### one of OptionBase::buildoption, OptionBase::learntoption or // ### OptionBase::tuningoption. If you don't provide one of these three, // ### this option will be ignored when loading values from a script. // ### You can also combine flags, for example with OptionBase::nosave: // ### (OptionBase::buildoption | OptionBase::nosave) declareOption(ol, "shift", &ShiftAndRescaleFeatureRealFunction::shift, OptionBase::buildoption, "Evaluation will return (x[which_feature]+shift)*scale."); declareOption(ol, "scale", &ShiftAndRescaleFeatureRealFunction::scale, OptionBase::buildoption, "Evaluation will return (x[which_feature]+shift)*scale."); declareOption(ol, "value_for_missing", &ShiftAndRescaleFeatureRealFunction::value_for_missing, OptionBase::buildoption, "If x[which_feature] is missing (NaN), evaluation will return value_for_missing."); // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::ShiftAndRescaleFeatureRealFunction::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 86 of file ShiftAndRescaleFeatureRealFunction.h.
:
//##### Protected Options ###############################################
ShiftAndRescaleFeatureRealFunction * PLearn::ShiftAndRescaleFeatureRealFunction::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
This should be implemented in subclasses default verison returns the value of the feature unaltered.
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 89 of file ShiftAndRescaleFeatureRealFunction.cc.
References PLearn::is_missing().
{ if(is_missing(x)) return value_for_missing; else return (x+shift)*scale; }
OptionList & PLearn::ShiftAndRescaleFeatureRealFunction::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
OptionMap & PLearn::ShiftAndRescaleFeatureRealFunction::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
RemoteMethodMap & PLearn::ShiftAndRescaleFeatureRealFunction::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 49 of file ShiftAndRescaleFeatureRealFunction.cc.
void PLearn::ShiftAndRescaleFeatureRealFunction::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 58 of file ShiftAndRescaleFeatureRealFunction.cc.
{ inherited::makeDeepCopyFromShallowCopy(copies); }
Reimplemented from PLearn::RealFunctionOfInputFeature.
Definition at line 86 of file ShiftAndRescaleFeatureRealFunction.h.
Definition at line 65 of file ShiftAndRescaleFeatureRealFunction.h.
Referenced by declareOptions().
Definition at line 64 of file ShiftAndRescaleFeatureRealFunction.h.
Referenced by declareOptions().
Definition at line 66 of file ShiftAndRescaleFeatureRealFunction.h.
Referenced by declareOptions().