KSquare Utilities
svm.cpp File Reference
#include "FirstIncludes.h"
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <float.h>
#include <string.h>
#include <string>
#include <stdarg.h>
#include <vector>
#include <assert.h>
#include <iostream>
#include "MemoryDebug.h"
#include "GlobalGoalKeeper.h"
#include "KKBaseTypes.h"
#include "KKException.h"
#include "KKStrParser.h"
#include "OSservices.h"
#include "KKMLLTypes.h"
#include "svm.h"

Go to the source code of this file.

Classes

class  SVM233::Cache
 
struct  SVM233::decision_function
 
class  SVM233::Kernel
 Kernel evaluation. More...
 
class  SVM233::ONE_CLASS_Q
 
class  SVM233::Solver
 
struct  SVM233::Solver::SolutionInfo
 
class  SVM233::Solver_NU
 
class  SVM233::SVC_Q
 
class  SVM233::SVR_Q
 

Namespaces

 SVM233
 This is version 2.33 of "Chih-Chung Chang" and "Chih-Jen Lin" Support vector Machine; the class "ModelOldSVM" calls ths version.
 

Macros

#define INF   HUGE_VAL
 
#define Malloc(type, n)   (type *)malloc((n)*sizeof(type))
 

Typedefs

typedef signed char SVM233::schar
 

Functions

template<class S , class T >
void SVM233::clone (T *&dst, S *src, kkint32 n)
 
void SVM233::info (const char *fmt,...)
 
void SVM233::info_flush ()
 
template<class T >
SVM233::max (T x, T y)
 
template<class T >
SVM233::min (T x, T y)
 
static void SVM233::solve_c_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si, double Cp, double Cn)
 
static void SVM233::solve_c_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si, double *C_)
 
static void SVM233::solve_epsilon_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void SVM233::solve_nu_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void SVM233::solve_nu_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void SVM233::solve_one_class (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
void svm_get_labels (const SvmModel233 *model, kkint32 *label)
 
kkint32 svm_get_nr_class (const SvmModel233 *model)
 
decision_function SVM233::svm_train_one (const svm_problem *prob, const svm_parameter *param)
 
decision_function SVM233::svm_train_one (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn, std::set< kkint32 > &BSVIndex)
 
template<class T >
void SVM233::Swap (T &x, T &y)
 
 SVM233::XmlFactoryMacro (SvmModel233) typedef float Qfloat
 

Variables

const char * kernel_type_table []
 
const char * svm_type_table []
 

Macro Definition Documentation

#define INF   HUGE_VAL

Definition at line 698 of file svm.cpp.

#define Malloc (   type,
 
)    (type *)malloc((n)*sizeof(type))

Definition at line 699 of file svm.cpp.

Function Documentation

void svm_get_labels ( const SvmModel233 model,
kkint32 label 
)

Definition at line 3679 of file svm.cpp.

References SVM233::SvmModel233::label, and SVM233::SvmModel233::nr_class.

3680 {
3681  for (kkint32 i = 0; i < model->nr_class; i++)
3682  label[i] = model->label[i];
3683 }
__int32 kkint32
Definition: KKBaseTypes.h:88
kkint32 nr_class
Definition: svm.h:138
kkint32 * label
Definition: svm.h:147
kkint32 svm_get_nr_class ( const SvmModel233 model)

Definition at line 3672 of file svm.cpp.

References SVM233::SvmModel233::nr_class.

3673 {
3674  return model->nr_class;
3675 }
kkint32 nr_class
Definition: svm.h:138

Variable Documentation

const char* kernel_type_table[]
Initial value:
=
{
"linear","polynomial","rbf","sigmoid",NULL
}

Definition at line 3694 of file svm.cpp.

const char* svm_type_table[]
Initial value:
=
{
"c_svc","nu_svc","one_class","epsilon_svr","nu_svr",NULL
}

Definition at line 3687 of file svm.cpp.