libocas.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  *  Implementation of SVM-Ocas solver.
00008  *
00009  *  Linear binary SVM solver without bias term.
00010  *
00011  * Modifications:
00012  * 10-oct-2007, VF, created.
00013  * 14-nov-2007, VF, timing statistics added
00014  * ----------------------------------------------------------------------*/
00015 
00016 #include <stdint.h>
00017 
00019 typedef struct {
00021   uint32_t nIter;
00023   uint32_t nCutPlanes;
00025   uint32_t nNZAlpha;
00027   double trn_err;
00029   double Q_P;
00031   double Q_D;
00033   double output_time;
00035   double sort_time;
00037   double add_time;
00039   double w_time;
00041   double solver_time;
00043   double ocas_time;
00044 
00049   int8_t exitflag;
00050 } ocas_return_value_T;
00051 
00052 ocas_return_value_T svm_ocas_solver(
00053         double C,            /* regularizarion constant */
00054         uint32_t nData,      /* number of exmaples */
00055         double TolRel,       /* halts if 1-Q_P/Q_D <= TolRel */
00056         double TolAbs,       /* halts if Q_P-Q_D <= TolRel */
00057         double QPBound,      /* halts if QP <= QPBound */
00058         uint32_t BufSize,    /* maximal number of buffered cutting planes  */
00059         uint8_t Method,      /* 0..standard CP (SVM-Perf,BMRM), 1..OCAS */
00060         void (*compute_W)(double*, double*, double*, uint32_t, void*),
00061         double (*update_W)(double, void*),
00062         void (*add_new_cut)(double*, uint32_t*, uint32_t, uint32_t, void*),
00063         void (*compute_output)( double*, void* ),
00064         void (*sort)(double*, uint32_t*, uint32_t),
00065         void* user_data);
00066 
00067 void qsort_index(double* value, uint32_t* index, uint32_t size);

SHOGUN Machine Learning Toolbox - Documentation