Classes | Defines | Typedefs | Functions | Variables
svm.cpp File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <float.h>
#include <string.h>
#include <stdarg.h>
#include "svm.h"
Include dependency graph for svm.cpp:

Go to the source code of this file.

Classes

class  Cache
struct  decision_function
struct  Cache::head_t
class  Kernel
class  ONE_CLASS_Q
class  QMatrix
struct  Solver::SolutionInfo
class  Solver
class  Solver_NU
class  SVC_Q
struct  svm_model
class  SVR_Q

Defines

#define INF   HUGE_VAL
#define Malloc(type, n)   (type *)malloc((n)*sizeof(type))
#define TAU   1e-12

Typedefs

typedef float Qfloat
typedef signed char schar

Functions

template<class S , class T >
void clone (T *&dst, S *src, int n)
void info (char *fmt,...)
void info_flush ()
template<class T >
max (T x, T y)
template<class T >
min (T x, T y)
void multiclass_probability (int k, double **r, double *p)
double powi (double base, int times)
double sigmoid_predict (double decision_value, double A, double B)
void sigmoid_train (int l, const double *dec_values, const double *labels, double &A, double &B)
static void solve_c_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si, double Cp, double Cn)
static void solve_epsilon_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
static void solve_nu_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
static void solve_nu_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
static void solve_one_class (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
void svm_binary_svc_probability (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn, double &probA, double &probB)
const char * svm_check_parameter (const svm_problem *prob, const svm_parameter *param)
int svm_check_probability_model (const svm_model *model)
void svm_cross_validation (const svm_problem *prob, const svm_parameter *param, int nr_fold, double *target)
void svm_destroy_model (svm_model *model)
void svm_destroy_param (svm_parameter *param)
void svm_get_labels (const svm_model *model, int *label)
int svm_get_nr_class (const svm_model *model)
int svm_get_svm_type (const svm_model *model)
double svm_get_svr_probability (const svm_model *model)
void svm_group_classes (const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
svm_modelsvm_load_model (const char *model_file_name)
double svm_predict (const svm_model *model, const svm_node *x)
double svm_predict_probability (const svm_model *model, const svm_node *x, double *prob_estimates)
void svm_predict_values (const svm_model *model, const svm_node *x, double *dec_values)
int svm_save_model (const char *model_file_name, const svm_model *model)
double svm_svr_probability (const svm_problem *prob, const svm_parameter *param)
svm_modelsvm_train (const svm_problem *prob, const svm_parameter *param)
decision_function svm_train_one (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn)
template<class T >
void swap (T &x, T &y)

Variables

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

Define Documentation

#define INF   HUGE_VAL

Definition at line 34 of file svm.cpp.

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

Definition at line 36 of file svm.cpp.

#define TAU   1e-12

Definition at line 35 of file svm.cpp.


Typedef Documentation

typedef float Qfloat

Definition at line 9 of file svm.cpp.

typedef signed char schar

Definition at line 10 of file svm.cpp.


Function Documentation

template<class S , class T >
void clone ( T *&  dst,
S *  src,
int  n 
) [inline]

Definition at line 18 of file svm.cpp.

void info ( char *  fmt,
  ... 
)

Definition at line 50 of file svm.cpp.

void info_flush ( )

Definition at line 51 of file svm.cpp.

template<class T >
T max ( x,
y 
) [inline]

Definition at line 15 of file svm.cpp.

template<class T >
T min ( x,
y 
) [inline]

Definition at line 12 of file svm.cpp.

void multiclass_probability ( int  k,
double **  r,
double *  p 
)

Definition at line 1843 of file svm.cpp.

double powi ( double  base,
int  times 
) [inline]

Definition at line 23 of file svm.cpp.

double sigmoid_predict ( double  decision_value,
double  A,
double  B 
)

Definition at line 1833 of file svm.cpp.

void sigmoid_train ( int  l,
const double *  dec_values,
const double *  labels,
double &  A,
double &  B 
)

Definition at line 1720 of file svm.cpp.

static void solve_c_svc ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo si,
double  Cp,
double  Cn 
) [static]

Definition at line 1431 of file svm.cpp.

static void solve_epsilon_svr ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo si 
) [static]

Definition at line 1553 of file svm.cpp.

static void solve_nu_svc ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo si 
) [static]

Definition at line 1466 of file svm.cpp.

static void solve_nu_svr ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo si 
) [static]

Definition at line 1591 of file svm.cpp.

static void solve_one_class ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo si 
) [static]

Definition at line 1521 of file svm.cpp.

void svm_binary_svc_probability ( const svm_problem prob,
const svm_parameter param,
double  Cp,
double  Cn,
double &  probA,
double &  probB 
)

Definition at line 1907 of file svm.cpp.

const char* svm_check_parameter ( const svm_problem prob,
const svm_parameter param 
)

Definition at line 2916 of file svm.cpp.

int svm_check_probability_model ( const svm_model model)

Definition at line 3034 of file svm.cpp.

void svm_cross_validation ( const svm_problem prob,
const svm_parameter param,
int  nr_fold,
double *  target 
)

Definition at line 2325 of file svm.cpp.

void svm_destroy_model ( svm_model model)

Definition at line 2894 of file svm.cpp.

void svm_destroy_param ( svm_parameter param)

Definition at line 2910 of file svm.cpp.

void svm_get_labels ( const svm_model model,
int *  label 
)

Definition at line 2451 of file svm.cpp.

int svm_get_nr_class ( const svm_model model)

Definition at line 2446 of file svm.cpp.

int svm_get_svm_type ( const svm_model model)

Definition at line 2441 of file svm.cpp.

double svm_get_svr_probability ( const svm_model model)

Definition at line 2458 of file svm.cpp.

void svm_group_classes ( const svm_problem prob,
int *  nr_class_ret,
int **  label_ret,
int **  start_ret,
int **  count_ret,
int *  perm 
)

Definition at line 2028 of file svm.cpp.

svm_model* svm_load_model ( const char *  model_file_name) [read]

Definition at line 2705 of file svm.cpp.

double svm_predict ( const svm_model model,
const svm_node x 
)

Definition at line 2525 of file svm.cpp.

double svm_predict_probability ( const svm_model model,
const svm_node x,
double *  prob_estimates 
)

Definition at line 2569 of file svm.cpp.

void svm_predict_values ( const svm_model model,
const svm_node x,
double *  dec_values 
)

Definition at line 2470 of file svm.cpp.

int svm_save_model ( const char *  model_file_name,
const svm_model model 
)

Definition at line 2618 of file svm.cpp.

double svm_svr_probability ( const svm_problem prob,
const svm_parameter param 
)

Definition at line 1994 of file svm.cpp.

svm_model* svm_train ( const svm_problem prob,
const svm_parameter param 
)

Definition at line 2088 of file svm.cpp.

decision_function svm_train_one ( const svm_problem prob,
const svm_parameter param,
double  Cp,
double  Cn 
)

Definition at line 1638 of file svm.cpp.

template<class T >
void swap ( T &  x,
T &  y 
) [inline]

Definition at line 17 of file svm.cpp.


Variable Documentation

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

Definition at line 2613 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 2608 of file svm.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


cl_libsvm
Author(s): Gabor Melis
autogenerated on Sun Oct 6 2013 12:19:01