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 <limits.h>
#include <locale.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
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 >
static void clone (T *&dst, S *src, int n)
static void info (const char *fmt,...)
template<class T >
static T max (T x, T y)
template<class T >
static T min (T x, T y)
static void multiclass_probability (int k, double **r, double *p)
static double powi (double base, int times)
static void print_string_stdout (const char *s)
static char * readline (FILE *input)
static double sigmoid_predict (double decision_value, double A, double B)
static 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)
static 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_param (svm_parameter *param)
void svm_free_and_destroy_model (svm_model **model_ptr_ptr)
void svm_free_model_content (svm_model *model_ptr)
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)
static 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)
double 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)
void svm_set_print_string_function (void(*print_func)(const char *))
static double svm_svr_probability (const svm_problem *prob, const svm_parameter *param)
svm_modelsvm_train (const svm_problem *prob, const svm_parameter *param)
static decision_function svm_train_one (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn)
template<class T >
static void swap (T &x, T &y)

Variables

static const char * kernel_type_table []
int libsvm_version = LIBSVM_VERSION
static char * line = NULL
static int max_line_len
static void(* svm_print_string )(const char *) = &print_string_stdout
static const char * svm_type_table []

Define Documentation

#define INF   HUGE_VAL

Definition at line 37 of file svm.cpp.

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

Definition at line 39 of file svm.cpp.

#define TAU   1e-12

Definition at line 38 of file svm.cpp.


Typedef Documentation

typedef float Qfloat

Definition at line 12 of file svm.cpp.

typedef signed char schar

Definition at line 13 of file svm.cpp.


Function Documentation

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

Definition at line 21 of file svm.cpp.

static void info ( const char *  fmt,
  ... 
) [static]

Definition at line 48 of file svm.cpp.

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

Definition at line 18 of file svm.cpp.

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

Definition at line 15 of file svm.cpp.

static void multiclass_probability ( int  k,
double **  r,
double *  p 
) [static]

Definition at line 1829 of file svm.cpp.

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

Definition at line 26 of file svm.cpp.

static void print_string_stdout ( const char *  s) [static]

Definition at line 41 of file svm.cpp.

static char* readline ( FILE *  input) [static]

Definition at line 2696 of file svm.cpp.

static double sigmoid_predict ( double  decision_value,
double  A,
double  B 
) [static]

Definition at line 1818 of file svm.cpp.

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

Definition at line 1705 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 1440 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 1562 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 1475 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 1600 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 1530 of file svm.cpp.

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

Definition at line 1893 of file svm.cpp.

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

Definition at line 2977 of file svm.cpp.

int svm_check_probability_model ( const svm_model model)

Definition at line 3098 of file svm.cpp.

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

Definition at line 2314 of file svm.cpp.

void svm_destroy_param ( svm_parameter param)

Definition at line 2971 of file svm.cpp.

void svm_free_and_destroy_model ( svm_model **  model_ptr_ptr)

Definition at line 2961 of file svm.cpp.

void svm_free_model_content ( svm_model model_ptr)

Definition at line 2929 of file svm.cpp.

void svm_get_labels ( const svm_model model,
int *  label 
)

Definition at line 2440 of file svm.cpp.

int svm_get_nr_class ( const svm_model model)

Definition at line 2435 of file svm.cpp.

int svm_get_svm_type ( const svm_model model)

Definition at line 2430 of file svm.cpp.

double svm_get_svr_probability ( const svm_model model)

Definition at line 2447 of file svm.cpp.

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

Definition at line 2014 of file svm.cpp.

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

Definition at line 2714 of file svm.cpp.

double svm_predict ( const svm_model model,
const svm_node x 
)

Definition at line 2535 of file svm.cpp.

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

Definition at line 2550 of file svm.cpp.

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

Definition at line 2459 of file svm.cpp.

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

Definition at line 2599 of file svm.cpp.

void svm_set_print_string_function ( void(*)(const char *)  print_func)

Definition at line 3106 of file svm.cpp.

static double svm_svr_probability ( const svm_problem prob,
const svm_parameter param 
) [static]

Definition at line 1980 of file svm.cpp.

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

Definition at line 2074 of file svm.cpp.

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

Definition at line 1647 of file svm.cpp.

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

Definition at line 20 of file svm.cpp.


Variable Documentation

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

Definition at line 2594 of file svm.cpp.

Definition at line 11 of file svm.cpp.

char* line = NULL [static]

Definition at line 2693 of file svm.cpp.

int max_line_len [static]

Definition at line 2694 of file svm.cpp.

void(* svm_print_string)(const char *) = &print_string_stdout [static]

Definition at line 46 of file svm.cpp.

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

Definition at line 2589 of file svm.cpp.



haf_grasping
Author(s): David Fischinger
autogenerated on Wed Jan 11 2017 03:48:49