![]() |
KSquare Utilities
|
#include <ModelParamDual.h>
Inheritance diagram for KKMLL::ModelParamDual:Public Types | |
| typedef ModelParamDual * | ModelParamDualPtr |
| enum | ProbFusionMethod { ProbFusionMethod::Null, ProbFusionMethod::Or, ProbFusionMethod::And } |
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 | |
| ModelParamDual () | |
| ModelParamDual (const KKStr &_configFileName1, const KKStr &_configFileName2, bool _fullHierarchyMustMatch) | |
| ModelParamDual (const ModelParamDual &_param) | |
| virtual | ~ModelParamDual () |
| const KKStr & | ConfigFileName1 () const |
| const KKStr & | ConfigFileName2 () const |
| virtual ModelParamDualPtr | Duplicate () const |
| bool | FullHierarchyMustMatch () const |
| virtual ModelParamTypes | ModelParamType () const |
| MLClassPtr | OtherClass () const |
| void | OtherClass (MLClassPtr _otherClass) |
| virtual void | ReadXML (XmlStream &s, XmlTagConstPtr tag, VolConstBool &cancelFlag, RunLog &log) |
| virtual KKStr | ToCmdLineStr () 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 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 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 |
Static Public Member Functions | |
| static ProbFusionMethod | ProbFusionMethodFromStr (const KKStr &s) |
| static KKStr | ProbFusionMethodToStr (ProbFusionMethod pfm) |
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) |
Parameters used for the Dual Classifier. *
Definition at line 17 of file ModelParamDual.h.
Definition at line 20 of file ModelParamDual.h.
|
strong |
| Enumerator | |
|---|---|
| Null | |
| Or | |
| And | |
Definition at line 22 of file ModelParamDual.h.
| ModelParamDual::ModelParamDual | ( | ) |
Definition at line 31 of file ModelParamDual.cpp.
References KKB::KKStr::KKStr(), KKMLL::ModelParam::ModelParam(), and Or.
| ModelParamDual::ModelParamDual | ( | const KKStr & | _configFileName1, |
| const KKStr & | _configFileName2, | ||
| bool | _fullHierarchyMustMatch | ||
| ) |
Definition at line 44 of file ModelParamDual.cpp.
References KKB::KKStr::KKStr(), KKMLL::ModelParam::ModelParam(), and Or.
| ModelParamDual::ModelParamDual | ( | const ModelParamDual & | _param | ) |
Definition at line 65 of file ModelParamDual.cpp.
References KKB::KKStr::KKStr(), and KKMLL::ModelParam::ModelParam().
Referenced by Duplicate().
|
virtual |
Definition at line 77 of file ModelParamDual.cpp.
|
inline |
Definition at line 49 of file ModelParamDual.h.
Referenced by KKMLL::ModelDual::TrainModel().
|
inline |
Definition at line 50 of file ModelParamDual.h.
Referenced by KKMLL::ModelDual::TrainModel().
|
virtual |
Implements KKMLL::ModelParam.
Definition at line 117 of file ModelParamDual.cpp.
References ModelParamDual().
|
inline |
Definition at line 51 of file ModelParamDual.h.
Referenced by KKMLL::ModelDual::ReconcilePredictions().
|
inlinevirtual |
Implements KKMLL::ModelParam.
Definition at line 54 of file ModelParamDual.h.
References KKMLL::ModelParam::Dual.
|
inline |
Definition at line 52 of file ModelParamDual.h.
Referenced by KKMLL::ModelDual::ReconcilePredictions().
|
inline |
Definition at line 56 of file ModelParamDual.h.
|
static |
Definition at line 82 of file ModelParamDual.cpp.
References And, KKB::KKStr::EqualIgnoreCase(), Null, and Or.
|
static |
Definition at line 95 of file ModelParamDual.cpp.
References And, KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), Null, and Or.
Referenced by ToCmdLineStr(), and WriteXML().
|
virtual |
Implements KKMLL::ModelParam.
Definition at line 278 of file ModelParamDual.cpp.
References KKB::KKStr::Concat(), KKB::KKStr::EqualIgnoreCase(), KKB::XmlStream::GetNextToken(), KKMLL::ModelParam::ReadXMLModelParamToken(), KKB::XmlElementBool::Value(), KKMLL::XmlElementMLClass::Value(), and KKB::XmlToken::VarName().
|
virtual |
Creates a Command Line String that represents these parameters.
Convert all parameters to a command line string.
All derived classes should implement this method. They should first call this method and then append there own parameters that are specific to their implementation.
Reimplemented from KKMLL::ModelParam.
Definition at line 222 of file ModelParamDual.cpp.
References KKB::KKStr::Concat(), KKB::KKStr::Empty(), KKB::KKStr::KKStr(), KKMLL::MLClass::Name(), KKB::KKStr::operator=(), ProbFusionMethodToStr(), and KKMLL::ModelParam::ToCmdLineStr().
|
virtual |
Definition at line 247 of file ModelParamDual.cpp.
References KKB::XmlTag::AddAtribute(), KKB::KKStr::Empty(), ProbFusionMethodToStr(), KKB::XmlTag::tagEnd, KKB::XmlTag::tagStart, KKMLL::MLClass::WriteXML(), KKB::XmlTag::WriteXML(), KKB::XmlElementBool::WriteXML(), KKB::KKStr::WriteXML(), KKMLL::ModelParam::WriteXMLFields(), and KKB::XmlTag::XmlTag().