![]() |
KSquare Utilities
|
#include <svm.h>
Public Member Functions | |
| SvmModel233 () | |
| SvmModel233 (const SvmModel233 &_model) | |
| ~SvmModel233 () | |
| kkint32 | MemoryConsumedEstimated () const |
| virtual void | ReadXML (XmlStream &s, XmlTagConstPtr tag, VolConstBool &cancelFlag, RunLog &log) |
| KKStr | SupportVectorName (kkint32 svIDX) |
| virtual void | WriteXML (const KKStr &varName, std::ostream &o) const |
Public Attributes | |
| std::set< kkint32 > | BSVIndex |
| kkint32 | dim |
| VectorKKStr | exampleNames |
| double * | featureWeight |
| double * | kValueTable |
| kkint32 | l |
| kkint32 * | label |
| double * | margin |
| kkint32 * | nonSVIndex |
| kkint32 | nr_class |
| kkint32 * | nSV |
| kkint32 | numNonSV |
| svm_parameter | param |
| double * | rho |
| svm_node ** | SV |
| double ** | sv_coef |
| kkint32 * | SVIndex |
| bool | valid |
| double | weight |
| bool | weOwnXspace |
| svm_node * | xSpace |
| SVM233::SvmModel233::SvmModel233 | ( | ) |
Definition at line 42 of file svm.cpp.
References dim, featureWeight, kValueTable, l, label, margin, nonSVIndex, nr_class, nSV, numNonSV, rho, SV, sv_coef, SVIndex, valid, weight, and weOwnXspace.
| SVM233::SvmModel233::~SvmModel233 | ( | ) |
|
inline |
Definition at line 177 of file svm.h.
References KKB::KKException::KKException().
| kkint32 SVM233::SvmModel233::MemoryConsumedEstimated | ( | ) | const |
Definition at line 70 of file svm.cpp.
References dim, featureWeight, kValueTable, l, label, nr_class, nSV, rho, SV, sv_coef, weOwnXspace, and xSpace.
Referenced by KKMLL::SVMModel::MemoryConsumedEstimated().
|
virtual |
Definition at line 234 of file svm.cpp.
References KKB::KKStr::Concat(), KKB::XmlContent::Content(), KKB::KKStr::EqualIgnoreCase(), KKB::KKStrParser::GetNextToken(), KKB::XmlStream::GetNextToken(), KKB::KKStrParser::GetNextTokenDouble(), KKB::KKStrParser::GetNextTokenInt(), SVM233::svm_node::index, KKB::KKStrParser::KKStrParser(), kValueTable, l, label, margin, KKB::KKStrParser::MoreTokens(), nr_class, nSV, rho, KKB::XmlElement::SectionName(), SV, sv_coef, KKB::XmlElement::ToInt32(), KKB::XmlToken::tokElement, KKB::XmlToken::TokenType(), KKB::KKStrParser::TrimWhiteSpace(), valid, SVM233::svm_node::value, KKB::XmlElement::VarName(), weOwnXspace, and xSpace.
Definition at line 134 of file svm.cpp.
Referenced by KKMLL::SVMModel::FindWorstSupportVectors(), KKMLL::SVMModel::FindWorstSupportVectors2(), and KKMLL::SVMModel::SupportVectorNames().
|
virtual |
Definition at line 144 of file svm.cpp.
References KKB::XmlTag::AddAtribute(), KKB::KKStr::Empty(), SVM233::svm_node::index, l, label, margin, nr_class, nSV, param, rho, SV, KKB::XmlTag::tagEnd, KKB::XmlTag::tagStart, SVM233::svm_parameter::ToTabDelStr(), KKB::XmlTag::WriteXML(), KKB::KKStr::WriteXML(), and KKB::XmlTag::XmlTag().
Referenced by KKMLL::SVMModel::WriteXML().
| kkint32 SVM233::SvmModel233::dim |
Definition at line 161 of file svm.h.
Referenced by MemoryConsumedEstimated(), SVM233::svm_BuildProbFromTwoClassModel(), and SvmModel233().
| VectorKKStr SVM233::SvmModel233::exampleNames |
| double* SVM233::SvmModel233::featureWeight |
Definition at line 162 of file svm.h.
Referenced by MemoryConsumedEstimated(), SVM233::svm_predictTwoClasses(), and SvmModel233().
| double* SVM233::SvmModel233::kValueTable |
Definition at line 165 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), SVM233::svm_predictTwoClasses(), and SvmModel233().
| kkint32 SVM233::SvmModel233::l |
Definition at line 139 of file svm.h.
Referenced by KKMLL::SVMModel::FindWorstSupportVectors(), KKMLL::SVMModel::FindWorstSupportVectors2(), MemoryConsumedEstimated(), KKMLL::SVMModel::NumOfSupportVectors(), ReadXML(), KKMLL::SVMModel::SupportVectorNames(), KKMLL::SVMModel::SupportVectorStatistics(), SVM233::svm_BuildProbFromTwoClassModel(), SVM233::svm_GetSupportVectorStatistics(), SVM233::svm_predictTwoClasses(), SvmModel233(), and WriteXML().
| kkint32* SVM233::SvmModel233::label |
Definition at line 147 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), svm_get_labels(), SVM233::svm_predictTwoClasses(), SvmModel233(), and WriteXML().
| double* SVM233::SvmModel233::margin |
Definition at line 158 of file svm.h.
Referenced by ReadXML(), SVM233::svm_margin(), SvmModel233(), and WriteXML().
| kkint32* SVM233::SvmModel233::nonSVIndex |
Definition at line 154 of file svm.h.
Referenced by SvmModel233().
| kkint32 SVM233::SvmModel233::nr_class |
Definition at line 138 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), SVM233::svm_BuildProbFromTwoClassModel(), svm_get_labels(), svm_get_nr_class(), SVM233::svm_GetSupportVectorStatistics(), SVM233::svm_margin(), SVM233::svm_predictTwoClasses(), SvmModel233(), KKMLL::SvmPredictClass(), KKMLL::SvmPredictRaw(), and WriteXML().
| kkint32* SVM233::SvmModel233::nSV |
number of SVs for each class (nSV[n]) nSV[0] + nSV[1] + ... + nSV[n-1] = l
Definition at line 148 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), SVM233::svm_BuildProbFromTwoClassModel(), SVM233::svm_GetSupportVectorStatistics(), SVM233::svm_margin(), SVM233::svm_predictTwoClasses(), SvmModel233(), and WriteXML().
| kkint32 SVM233::SvmModel233::numNonSV |
Definition at line 155 of file svm.h.
Referenced by SvmModel233().
| svm_parameter SVM233::SvmModel233::param |
Definition at line 137 of file svm.h.
Referenced by KKMLL::SVMModel::FindWorstSupportVectors2(), SVM233::svm_BuildProbFromTwoClassModel(), SVM233::svm_GetSupportVectorStatistics(), SVM233::svm_margin(), SVM233::svm_predictTwoClasses(), and WriteXML().
| double* SVM233::SvmModel233::rho |
Definition at line 143 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), SVM233::svm_predictTwoClasses(), SvmModel233(), and WriteXML().
| svm_node** SVM233::SvmModel233::SV |
SVs (SV[l]) Support vector feature numbers
Definition at line 141 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), SVM233::svm_BuildProbFromTwoClassModel(), SVM233::svm_margin(), SVM233::svm_predictTwoClasses(), SvmModel233(), and WriteXML().
| double** SVM233::SvmModel233::sv_coef |
Definition at line 142 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), SVM233::svm_GetSupportVectorStatistics(), SVM233::svm_margin(), SVM233::svm_predictTwoClasses(), and SvmModel233().
| kkint32* SVM233::SvmModel233::SVIndex |
Definition at line 153 of file svm.h.
Referenced by SvmModel233().
| bool SVM233::SvmModel233::valid |
Set to false if model is InValid; example look at ReadXML
Definition at line 169 of file svm.h.
Referenced by ReadXML(), and SvmModel233().
| double SVM233::SvmModel233::weight |
Definition at line 159 of file svm.h.
Referenced by SvmModel233().
| bool SVM233::SvmModel233::weOwnXspace |
Definition at line 171 of file svm.h.
Referenced by MemoryConsumedEstimated(), ReadXML(), and SvmModel233().
| svm_node* SVM233::SvmModel233::xSpace |
Definition at line 167 of file svm.h.
Referenced by MemoryConsumedEstimated(), and ReadXML().