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 "lib/common.h"
00017 
00018 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00019 namespace shogun
00020 {
00022 typedef struct {
00024   uint32_t nIter;
00026   uint32_t nCutPlanes;
00028   uint32_t nNZAlpha;
00030   float64_t trn_err;
00032   float64_t Q_P;
00034   float64_t Q_D;
00036   float64_t output_time;
00038   float64_t sort_time;
00040   float64_t add_time;
00042   float64_t w_time;
00044   float64_t solver_time;
00046   float64_t ocas_time;
00047 
00052   int8_t exitflag;
00053 } ocas_return_value_T;
00054 
00055 ocas_return_value_T svm_ocas_solver(
00056         float64_t C,            /* regularizarion constant */
00057         uint32_t nData,      /* number of exmaples */
00058         float64_t TolRel,       /* halts if 1-Q_P/Q_D <= TolRel */
00059         float64_t TolAbs,       /* halts if Q_P-Q_D <= TolRel */
00060         float64_t QPBound,      /* halts if QP <= QPBound */
00061         uint32_t BufSize,    /* maximal number of buffered cutting planes  */
00062         uint8_t Method,      /* 0..standard CP (SVM-Perf,BMRM), 1..OCAS */
00063         void (*compute_W)(float64_t*, float64_t*, float64_t*, uint32_t, void*),
00064         float64_t (*update_W)(float64_t, void*),
00065         void (*add_new_cut)(float64_t*, uint32_t*, uint32_t, uint32_t, void*),
00066         void (*compute_output)( float64_t*, void* ),
00067         void (*sort)(float64_t*, uint32_t*, uint32_t),
00068         void* user_data);
00069 }
00070 #endif // DOXYGEN_SHOULD_SKIP_THIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation