-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
42 lines (31 loc) · 1.39 KB
/
main.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
#ifndef MAIN_H
#define MAIN_H
#include "decision_tree_training.h"
/* one-shot Implementation*/
// #define ONE_SHOT
#define AutoDT
// #define AutoKNN
// How likely each data point belong to each cluster.
#define CONFIDENCE
/* FILTERING STRATEGY */
#define CONF
#ifdef CONF
#define FILTER "CONF"
#endif
// #define FIFO
#ifdef FIFO
#define FILTER "FIFO"
#endif
// #define RANDOM
#ifdef RANDOM
#define FILTER "RANDOM"
#endif
int kmeans(float max_samples[MEMORY_SIZE+UPDATE_THR][N_FEATURE], float centroids[K][N_FEATURE], float weights[MEMORY_SIZE][K], int *y_train, int max);
struct Node* decision_tree_training(float max_samples[MEMORY_SIZE+UPDATE_THR][N_FEATURE], struct Node* root, int y_train[MEMORY_SIZE+UPDATE_THR], int size);
int decision_tree_classifier(struct Node* root, float X[]);
int knn_classification(float X[], float training_samples[MEMORY_SIZE+UPDATE_THR][N_FEATURE], int y_train[MEMORY_SIZE+UPDATE_THR], int n_samples);
int pipeline(float max_samples[MEMORY_SIZE+UPDATE_THR][N_FEATURE], struct Node* root, int y_train[MEMORY_SIZE+UPDATE_THR], int n_samples, int counter);
void quicksort_idx(int y_train[MEMORY_SIZE+UPDATE_THR], int indices[MEMORY_SIZE + UPDATE_THR], int first, int last);
int update_mem(float max_samples[MEMORY_SIZE+UPDATE_THR][N_FEATURE], int indices[MEMORY_SIZE+UPDATE_THR],int n_samples);
int* random_func(int idx_to_replace[]);
#endif