Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | 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 <hugin_config.h>
Include dependency graph for svm.cpp:

Go to the source code of this file.

Classes

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

Namespaces

 celeste
 

Macros

#define log1p(x)   log(1+x)
 
#define INF   HUGE_VAL
 
#define TAU   1e-12
 
#define Malloc(type, n)   (type *)malloc((n)*sizeof(type))
 
#define FSCANF(_stream, _format, _var)   do{ if (fscanf(_stream, _format, _var) != 1) return false; }while(0)
 

Typedefs

typedef float celeste::Qfloat
 
typedef signed char celeste::schar
 

Functions

template<class T >
static T celeste::min (T x, T y)
 
template<class T >
static T celeste::max (T x, T y)
 
template<class T >
static void celeste::swap (T &x, T &y)
 
template<class S , class T >
static void celeste::clone (T *&dst, S *src, int n)
 
static double celeste::powi (double base, int times)
 
static void celeste::print_string_stdout (const char *s)
 
static void celeste::info (const char *fmt,...)
 
static void celeste::solve_c_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si, double Cp, double Cn)
 
static void celeste::solve_nu_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void celeste::solve_one_class (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void celeste::solve_epsilon_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void celeste::solve_nu_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static decision_function celeste::svm_train_one (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn)
 
static void celeste::sigmoid_train (int l, const double *dec_values, const double *labels, double &A, double &B)
 
static double celeste::sigmoid_predict (double decision_value, double A, double B)
 
static void celeste::multiclass_probability (int k, double **r, double *p)
 
static void celeste::svm_binary_svc_probability (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn, double &probA, double &probB)
 
static double celeste::svm_svr_probability (const svm_problem *prob, const svm_parameter *param)
 
static void celeste::svm_group_classes (const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
 
svm_model * celeste::svm_train (const svm_problem *prob, const svm_parameter *param)
 
void celeste::svm_cross_validation (const svm_problem *prob, const svm_parameter *param, int nr_fold, double *target)
 
int celeste::svm_get_svm_type (const svm_model *model)
 
int celeste::svm_get_nr_class (const svm_model *model)
 
void celeste::svm_get_labels (const svm_model *model, int *label)
 
void celeste::svm_get_sv_indices (const svm_model *model, int *indices)
 
int celeste::svm_get_nr_sv (const svm_model *model)
 
double celeste::svm_get_svr_probability (const svm_model *model)
 
double celeste::svm_predict_values (const svm_model *model, const svm_node *x, double *dec_values)
 
double celeste::svm_predict (const svm_model *model, const svm_node *x)
 
double celeste::svm_predict_probability (const svm_model *model, const svm_node *x, double *prob_estimates)
 
int celeste::svm_save_model (const char *model_file_name, const svm_model *model)
 
static char * celeste::readline (FILE *input)
 
bool celeste::read_model_header (FILE *fp, svm_model *model)
 
svm_model * celeste::svm_load_model (const char *model_file_name)
 
void celeste::svm_free_model_content (svm_model *model_ptr)
 
void celeste::svm_free_and_destroy_model (svm_model **model_ptr_ptr)
 
void celeste::svm_destroy_param (svm_parameter *param)
 
const char * celeste::svm_check_parameter (const svm_problem *prob, const svm_parameter *param)
 
int celeste::svm_check_probability_model (const svm_model *model)
 
void celeste::svm_set_print_string_function (void(*print_func)(const char *))
 

Variables

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

Macro Definition Documentation

#define FSCANF (   _stream,
  _format,
  _var 
)    do{ if (fscanf(_stream, _format, _var) != 1) return false; }while(0)

Definition at line 2810 of file svm.cpp.

Referenced by celeste::read_model_header().

#define INF   HUGE_VAL
#define log1p (   x)    log(1+x)

Definition at line 48 of file svm.cpp.

Referenced by celeste::sigmoid_train().

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