![]() |
KSquare Utilities
|
#include <ModelParamKnn.h>
Inheritance diagram for KKMLL::ModelParamKnn:Public Types | |
| typedef ModelParamKnn * | ModelParamKnnPtr |
Public Types inherited from KKMLL::ModelParam | |
| enum | EncodingMethodType { EncodingMethodType::Null, EncodingMethodType::NoEncoding, EncodingMethodType::Binary, EncodingMethodType::Scaled } |
| typedef ModelParam * | ModelParamPtr |
| enum | ModelParamTypes { ModelParamTypes::Null, ModelParamTypes::Dual, ModelParamTypes::KNN, ModelParamTypes::OldSVM, ModelParamTypes::SvmBase, ModelParamTypes::UsfCasCor } |
Public Member Functions | |
| ModelParamKnn () | |
| ModelParamKnn (const ModelParamKnn &_param) | |
| virtual | ~ModelParamKnn () |
| virtual ModelParamKnnPtr | Duplicate () const |
| virtual ModelParamTypes | ModelParamType () const |
| virtual void | ReadXML (XmlStream &s, XmlTagConstPtr tag, VolConstBool &cancelFlag, RunLog &log) |
| virtual KKStr | ToCmdLineStr (RunLog &log) const |
| Creates a Command Line String that represents these parameters. More... | |
| virtual void | WriteXML (const KKStr &varName, ostream &o) const |
Public Member Functions inherited from KKMLL::ModelParam | |
| ModelParam () | |
| ModelParam (const ModelParam &_param) | |
| virtual | ~ModelParam () |
| virtual float | A_Param () const |
| virtual void | A_Param (float _prob) |
| virtual float | AvgMumOfFeatures () const |
| virtual double | C_Param () const |
| virtual void | C_Param (double _cost) |
| virtual double | Cost () const |
| virtual void | Cost (double _cost) |
| virtual EncodingMethodType | EncodingMethod () const |
| virtual void | EncodingMethod (EncodingMethodType _encodingMethod) |
| virtual KKStr | EncodingMethodStr () const |
| virtual kkint32 | ExamplesPerClass () const |
| virtual void | ExamplesPerClass (kkint32 _examplesPerClass) |
| virtual const KKStr & | FileName () const |
| virtual void | FileName (const KKStr &_fileName) |
| virtual double | Gamma () const |
| virtual void | Gamma (double _gamma) |
| virtual kkint32 | MemoryConsumedEstimated () const |
| virtual KKStr | ModelParamTypeStr () const |
| virtual bool | NormalizeNominalFeatures () const |
| virtual kkint32 | NumOfFeaturesAfterEncoding (FileDescPtr fileDesc, RunLog &log) const |
| virtual void | ParseCmdLine (KKStr _cmdLineStr, bool &_validFormat, RunLog &_log) |
| virtual void | ParseCmdLinePost (RunLog &log) |
| Called after 'ParseCmdLine' is completed. Classed derived from 'ModelParam' can implement this method to do any processing that they want after the entire command line has been processed. More... | |
| virtual float | Prob () const |
| virtual void | Prob (float _prob) |
| XmlTokenPtr | ReadXMLModelParamToken (XmlTokenPtr t) |
| Will process any tokens that belong to 'ModelParam' and return NULL ones that are not will be passed back. More... | |
| virtual FeatureNumListConstPtr | SelectedFeatures () const |
| virtual void | SelectedFeatures (FeatureNumListConst &_selectedFeatures) |
| virtual KKStr | ToCmdLineStr () const |
| Creates a a Command Line String that represents these parameters. More... | |
| virtual bool | ValidParam () const |
| virtual void | ValidParam (bool _validParam) |
| virtual void | WriteXML (const KKStr &varName, std::ostream &o) const =0 |
| void | WriteXMLFields (std::ostream &o) const |
Additional Inherited Members | |
Static Public Member Functions inherited from KKMLL::ModelParam | |
| static EncodingMethodType | EncodingMethodFromStr (const KKStr &encodingMethodStr) |
| static KKStr | EncodingMethodToStr (EncodingMethodType encodingMethod) |
| static ModelParamTypes | ModelParamTypeFromStr (const KKStr &_modelParamTypeStr) |
| static KKStr | ModelParamTypeToStr (ModelParamTypes _modelParamType) |
Definition at line 8 of file ModelParamKnn.h.
Definition at line 11 of file ModelParamKnn.h.
| ModelParamKnn::ModelParamKnn | ( | ) |
| ModelParamKnn::ModelParamKnn | ( | const ModelParamKnn & | _param | ) |
Definition at line 36 of file ModelParamKnn.cpp.
References KKMLL::ModelParam::ModelParam().
Referenced by Duplicate().
|
virtual |
Definition at line 44 of file ModelParamKnn.cpp.
|
virtual |
Implements KKMLL::ModelParam.
Definition at line 51 of file ModelParamKnn.cpp.
References ModelParamKnn().
|
inlinevirtual |
Implements KKMLL::ModelParam.
Definition at line 26 of file ModelParamKnn.h.
References KKMLL::ModelParam::KNN.
|
virtual |
Implements KKMLL::ModelParam.
Definition at line 119 of file ModelParamKnn.cpp.
References KKB::KKStr::Concat(), KKB::KKStr::EqualIgnoreCase(), KKB::XmlStream::GetNextToken(), KKMLL::ModelParam::ReadXMLModelParamToken(), and KKB::XmlToken::VarName().
Creates a Command Line String that represents these parameters.
Definition at line 59 of file ModelParamKnn.cpp.
References KKB::KKStr::operator+(), KKB::StrFormatInt(), and KKMLL::ModelParam::ToCmdLineStr().
|
virtual |
Definition at line 95 of file ModelParamKnn.cpp.
References KKB::XmlTag::AddAtribute(), KKB::KKStr::Empty(), KKB::XmlTag::tagEnd, KKB::XmlTag::tagStart, KKB::XmlTag::WriteXML(), KKMLL::ModelParam::WriteXMLFields(), and KKB::XmlTag::XmlTag().
Referenced by KKMLL::ModelKnn::WriteXML().