aboutsummaryrefslogtreecommitdiff
path: root/include/libMSVMMaj.h
blob: c886ded47663c5f75356cf11bc2f97f900f86b4e (plain)
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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <cblas.h>
#include <string.h>
#include "util.h"

void simplex_gen(long K, double *U);
void category_matrix(struct Model *model, struct Data *data);
void simplex_diff(struct Model *model, struct Data *dataset);

void calculate_errors(struct Model *model, struct Data *data, double *ZV);
void calculate_huber(struct Model *model);

double get_msvmmaj_loss(struct Model *model, struct Data *data, double *ZV);
void msvmmaj_update(struct Model *model, struct Data *data, 
		int *ClassIdx, double *A, double *B, double *Omega, 
		double *ZAZ, double *ZAZV, double *ZAZVT);
void step_doubling(struct Model *model);

void main_loop(struct Model *model, struct Data *data);

int dposv(char UPLO, int N, int NRHS, double *A, int LDA, double *B, int LDB);

void initialize_weights(struct Data *data, struct Model *model);