-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathtrain.h
More file actions
32 lines (24 loc) · 703 Bytes
/
train.h
File metadata and controls
32 lines (24 loc) · 703 Bytes
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
#ifndef _TRAIN_H_
#define _TRAIN_H_
void *my_malloc(long t);
float dot_rgb(float *x1,float *x2);
float dot_linear(float *x1,float *x2,int);
float (*dot_poduct)(float *,float *);
typedef struct problem_parameter{
float **data_vector; // pointer to the datavector
int *label;
int dimension;
int size;
float C;
float tolerance;
float *w;
float *b;
float *Erroi;
float *alpha;
}problem_parameter;
int examineExample(int i1,problem_parameter *prob_para);
int takeStep(int i1,int i2,problem_parameter *prob_para);
problem_parameter init_Prob_Para(float **data_vector,int *label,int dimension,int size,
float C,float tolerance);
void svm_train(problem_parameter *prob_para);
#endif