![]() |
KSquare Utilities
|
#include <svm2.h>
Public Member Functions | |
| Svm_Model () | |
| Svm_Model (const Svm_Model &_model, FileDescPtr _fileDesc) | |
| Svm_Model (FileDescPtr _fileDesc) | |
| Svm_Model (const svm_parameter &_param, const FeatureNumList &_selFeatures, FileDescPtr _fileDesc) | |
| ~Svm_Model () | |
| void | CancelFlag (bool cancelFlag) |
| void | CleanUpMemory () |
| double * | DecValues () |
| kkint32 | MemoryConsumedEstimated () const |
| void | NormalizeProbability () |
| Derives multi-class probability. More... | |
| double ** | PairwiseProb () |
| double * | ProbEstimates () |
| virtual void | ReadXML (XmlStream &s, XmlTagConstPtr tag, VolConstBool &cancelFlag, RunLog &log) |
| virtual void | WriteXML (const KKStr &varName, ostream &o) const |
Public Attributes | |
| volatile bool | cancelFlag |
| double * | dec_values |
| FileDescPtr | fileDesc |
| kkint32 * | label |
| kkint32 | nr_class |
| kkint32 * | nSV |
| kkint32 | numSVs |
| double ** | pairwise_prob |
| svm_parameter | param |
| double * | prob_estimates |
| double * | probA |
| double * | probB |
| double * | rho |
| FeatureNumList | selFeatures |
| FeatureVectorList | SV |
| double ** | sv_coef |
| bool | weOwnSupportVectors |
| SVM289_MFS::Svm_Model::Svm_Model | ( | ) |
Definition at line 4067 of file svm2.cpp.
References cancelFlag, dec_values, fileDesc, label, nr_class, nSV, numSVs, pairwise_prob, param, prob_estimates, probA, probB, rho, selFeatures, sv_coef, Svm_Model(), SVM289_MFS::svm_parameter::svm_parameter(), and weOwnSupportVectors.
Referenced by Svm_Model().
| SVM289_MFS::Svm_Model::Svm_Model | ( | const Svm_Model & | _model, |
| FileDescPtr | _fileDesc | ||
| ) |
Definition at line 4089 of file svm2.cpp.
References cancelFlag, dec_values, KKMLL::FeatureNumList::FeatureNumList(), fileDesc, label, nr_class, nSV, numSVs, pairwise_prob, param, prob_estimates, probA, probB, rho, selFeatures, sv_coef, Svm_Model(), SVM289_MFS::svm_parameter::svm_parameter(), and weOwnSupportVectors.
Referenced by KKMLL::ModelSvmBase::ModelSvmBase(), and Svm_Model().
| SVM289_MFS::Svm_Model::Svm_Model | ( | FileDescPtr | _fileDesc | ) |
Definition at line 4178 of file svm2.cpp.
References cancelFlag, dec_values, KKMLL::FeatureNumList::FeatureNumList(), fileDesc, label, nr_class, nSV, numSVs, pairwise_prob, param, prob_estimates, probA, probB, rho, selFeatures, sv_coef, Svm_Model(), SVM289_MFS::svm_parameter::svm_parameter(), and weOwnSupportVectors.
Referenced by Svm_Model().
| SVM289_MFS::Svm_Model::Svm_Model | ( | const svm_parameter & | _param, |
| const FeatureNumList & | _selFeatures, | ||
| FileDescPtr | _fileDesc | ||
| ) |
Definition at line 4200 of file svm2.cpp.
References cancelFlag, dec_values, KKMLL::FeatureNumList::FeatureNumList(), fileDesc, label, nr_class, nSV, numSVs, pairwise_prob, param, prob_estimates, probA, probB, rho, selFeatures, sv_coef, Svm_Model(), SVM289_MFS::svm_parameter::svm_parameter(), and weOwnSupportVectors.
Referenced by Svm_Model(), and SVM289_MFS::svm_train().
| SVM289_MFS::Svm_Model::~Svm_Model | ( | ) |
| void SVM289_MFS::Svm_Model::CancelFlag | ( | bool | cancelFlag | ) |
| void SVM289_MFS::Svm_Model::CleanUpMemory | ( | ) |
Definition at line 4235 of file svm2.cpp.
References dec_values, label, nr_class, nSV, pairwise_prob, prob_estimates, probA, probB, rho, and sv_coef.
Referenced by ReadXML(), and ~Svm_Model().
| double * SVM289_MFS::Svm_Model::DecValues | ( | ) |
Definition at line 4303 of file svm2.cpp.
References dec_values, and nr_class.
Referenced by SVM289_MFS::svm_predict_probability().
| kkint32 SVM289_MFS::Svm_Model::MemoryConsumedEstimated | ( | ) | const |
Definition at line 4284 of file svm2.cpp.
References dec_values, label, nr_class, nSV, numSVs, pairwise_prob, prob_estimates, probA, probB, rho, and sv_coef.
Referenced by KKMLL::ModelSvmBase::MemoryConsumedEstimated().
| void SVM289_MFS::Svm_Model::NormalizeProbability | ( | ) |
Derives multi-class probability.
Definition at line 4581 of file svm2.cpp.
References nr_class, pairwise_prob, prob_estimates, and ProbEstimates().
Referenced by SVM289_MFS::svm_predict_probability().
| double ** SVM289_MFS::Svm_Model::PairwiseProb | ( | ) |
Definition at line 4319 of file svm2.cpp.
References nr_class, and pairwise_prob.
Referenced by KKMLL::ModelSvmBase::RetrieveCrossProbTable(), and SVM289_MFS::svm_predict_probability().
| double * SVM289_MFS::Svm_Model::ProbEstimates | ( | ) |
Definition at line 4311 of file svm2.cpp.
References nr_class, and prob_estimates.
Referenced by NormalizeProbability(), and SVM289_MFS::svm_predict_probability().
|
virtual |
Reading in all the info needed to build the Svm_Model data structure including allocating needed memory.
Definition at line 4417 of file svm2.cpp.
References CleanUpMemory(), SVM289_MFS::svm_parameter::coef0, KKB::KKStr::Concat(), SVM289_MFS::svm_parameter::degree, KKB::KKStr::EqualIgnoreCase(), fileDesc, SVM289_MFS::svm_parameter::gamma, KKB::XmlStream::GetNextToken(), SVM289_MFS::svm_parameter::kernel_type, SVM289_MFS::Kernel_Type_FromStr(), label, nr_class, nSV, numSVs, param, probA, probB, rho, sv_coef, SVM289_MFS::svm_parameter::svm_type, SVM289_MFS::SVM_Type_FromStr(), KKB::XmlToken::tokElement, KKB::XmlToken::TokenType(), KKMLL::XmlElementFileDesc::Value(), KKB::XmlToken::VarName(), and weOwnSupportVectors.
|
virtual |
Definition at line 4332 of file svm2.cpp.
References KKB::XmlTag::AddAtribute(), SVM289_MFS::svm_parameter::coef0, KKB::KKStr::Concat(), SVM289_MFS::svm_parameter::degree, KKB::KKStr::Empty(), KKMLL::FeatureVector::ExampleFileName(), KKMLL::FeatureVector::FeatureData(), fileDesc, SVM289_MFS::svm_parameter::gamma, SVM289_MFS::svm_parameter::kernel_type, SVM289_MFS::Kernel_Type_ToStr(), KKB::KKStr::KKStr(), label, nr_class, nSV, KKMLL::FeatureVector::NumOfFeatures(), numSVs, param, SVM289_MFS::POLY, SVM289_MFS::PRECOMPUTED, probA, probB, SVM289_MFS::RBF, rho, selFeatures, SVM289_MFS::SIGMOID, KKB::SPRINTF(), sv_coef, SVM289_MFS::svm_parameter::svm_type, SVM289_MFS::SVM_Type_ToStr(), KKB::XmlTag::tagEnd, KKB::XmlTag::tagStart, KKMLL::FeatureNumList::WriteXML(), KKB::XmlTag::WriteXML(), KKMLL::FileDesc::WriteXML(), KKB::KKStr::WriteXML(), and KKB::XmlTag::XmlTag().
Referenced by KKMLL::ModelSvmBase::WriteXML().
| volatile bool SVM289_MFS::Svm_Model::cancelFlag |
Definition at line 202 of file svm2.h.
Referenced by CancelFlag(), and Svm_Model().
| double* SVM289_MFS::Svm_Model::dec_values |
Definition at line 225 of file svm2.h.
Referenced by CleanUpMemory(), DecValues(), MemoryConsumedEstimated(), and Svm_Model().
| FileDescPtr SVM289_MFS::Svm_Model::fileDesc |
Definition at line 203 of file svm2.h.
Referenced by ReadXML(), Svm_Model(), and WriteXML().
| kkint32* SVM289_MFS::Svm_Model::label |
Definition at line 216 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), ReadXML(), svm_binary_svc_probability(), svm_get_labels(), Svm_Model(), SVM289_MFS::svm_predict_probability(), SVM289_MFS::svm_train(), and WriteXML().
| kkint32 SVM289_MFS::Svm_Model::nr_class |
Definition at line 205 of file svm2.h.
Referenced by CleanUpMemory(), DecValues(), MemoryConsumedEstimated(), NormalizeProbability(), PairwiseProb(), ProbEstimates(), ReadXML(), svm_get_labels(), Svm_Model(), SVM289_MFS::svm_predict_probability(), SVM289_MFS::svm_predict_values(), SVM289_MFS::svm_train(), and WriteXML().
| kkint32* SVM289_MFS::Svm_Model::nSV |
Definition at line 217 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), ReadXML(), Svm_Model(), SVM289_MFS::svm_predict_values(), SVM289_MFS::svm_train(), and WriteXML().
| kkint32 SVM289_MFS::Svm_Model::numSVs |
total SV
Definition at line 206 of file svm2.h.
Referenced by MemoryConsumedEstimated(), KKMLL::ModelSvmBase::NumOfSupportVectors(), ReadXML(), Svm_Model(), SVM289_MFS::svm_predict_values(), SVM289_MFS::svm_train(), and WriteXML().
| double** SVM289_MFS::Svm_Model::pairwise_prob |
Definition at line 226 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), NormalizeProbability(), PairwiseProb(), and Svm_Model().
| svm_parameter SVM289_MFS::Svm_Model::param |
Definition at line 204 of file svm2.h.
Referenced by ReadXML(), svm_check_probability_model(), svm_get_svm_type(), svm_get_svr_probability(), Svm_Model(), SVM289_MFS::svm_predict_probability(), SVM289_MFS::svm_predict_values(), and WriteXML().
| double* SVM289_MFS::Svm_Model::prob_estimates |
Definition at line 227 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), NormalizeProbability(), ProbEstimates(), and Svm_Model().
| double* SVM289_MFS::Svm_Model::probA |
Definition at line 210 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), ReadXML(), svm_check_probability_model(), svm_get_svr_probability(), Svm_Model(), SVM289_MFS::svm_predict_probability(), SVM289_MFS::svm_train(), and WriteXML().
| double* SVM289_MFS::Svm_Model::probB |
Definition at line 211 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), ReadXML(), svm_check_probability_model(), Svm_Model(), SVM289_MFS::svm_predict_probability(), SVM289_MFS::svm_train(), and WriteXML().
| double* SVM289_MFS::Svm_Model::rho |
Definition at line 209 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), ReadXML(), Svm_Model(), SVM289_MFS::svm_predict_values(), SVM289_MFS::svm_train(), and WriteXML().
| FeatureNumList SVM289_MFS::Svm_Model::selFeatures |
Definition at line 212 of file svm2.h.
Referenced by Svm_Model(), and WriteXML().
| FeatureVectorList SVM289_MFS::Svm_Model::SV |
| double** SVM289_MFS::Svm_Model::sv_coef |
Definition at line 208 of file svm2.h.
Referenced by CleanUpMemory(), MemoryConsumedEstimated(), ReadXML(), Svm_Model(), SVM289_MFS::svm_predict_values(), SVM289_MFS::svm_train(), and WriteXML().
| bool SVM289_MFS::Svm_Model::weOwnSupportVectors |
Definition at line 220 of file svm2.h.
Referenced by ReadXML(), Svm_Model(), and SVM289_MFS::svm_train().