-
Notifications
You must be signed in to change notification settings - Fork 0
/
StandardSVM.h
executable file
·63 lines (48 loc) · 1.94 KB
/
StandardSVM.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//===////////////////////////////////////////////////////////////////////
// //
// SVMTorch II V1.77 [Ennastie] //
// //
// Author: Ronan Collobert //
// Date: 20.11.2001 //
// //
// Copyright (c) 2001 IDIAP & DIRO U. de Montreal //
// All rights reserved //
// //
// This software is available for non-commercial use only. It must //
// not be modified and distributed without prior permission of the //
// author. The author is not responsible for implications from the //
// use of this software. //
// //
////////////////////////////////////////////////////////////////////===//
#ifndef STANDARDSVM_INC
#define STANDARDSVM_INC
#include "SVM.h"
#include "UserKernel.h"
class StandardSVM : public SVM
{
private:
real C;
void prepareToLauch();
void atomiseAll();
bool svm_is_ready;
bool support_vectors_is_ready;
int lm;
real eps_regression;
real cache_size_meg;
public:
int n_support_vectors;
int n_support_vectors_bound;
int *support_vectors;
real *sv_alpha;
bool regression_mode;
StandardSVM();
virtual void analyticSolve(int xi, int xj);
virtual void setOption(const string& optionname, const string& value);
void train(real **data_, sreal **sdata_, real *target_, int l_, int n_input_dim_);
real use(real *x);
real use(sreal *x);
void save(string file, string comment);
void load(string file);
~StandardSVM();
};
#endif