aboutsummaryrefslogtreecommitdiff
path: root/include/libMSVMMaj.h
blob: 74f1e10838ce1e42e813d6e121fb468e4a8e4def (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
27
28
#include <stdio.h>
#include <stdlib.h>
#include <math.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, 
		double *B, 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);

void predict_labels(struct Data *data, struct Model *model, long *predy);
double prediction_perf(struct Data *data, long *predy);