-
Notifications
You must be signed in to change notification settings - Fork 2
/
cmkde.h
executable file
·36 lines (26 loc) · 911 Bytes
/
cmkde.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
#ifndef CMKDE_H
#define CMKDE_H
// ---- STRUCTURES ----
typedef struct SampleData{
// Structure containing all data relevant to computation in this library.
// Reflected by active_particles.mkde._SampleData.
//
// data sample
int n; // number of data points
int d; // number of dimensions
double **data; // array of data points
// computed asymptotic mean integrated squared error (AMISE) and its derivatives with respect to the bandwidths
double *AMISE; // AMISE
double *gradAMISE; // gradient of AMISE
double **hessAMISE; // Hessian matrix of AMISE
// optimised bandwidths
double *h; // bandwidths
} SampleData;
// ---- PROTOTYPES ----
// AMISE AND ITS GRADIENT AND HESSIAN MATRIX
void AMISE(SampleData *sd);
void gradAMISE(SampleData *sd);
void hessAMISE(SampleData *sd);
// SIMPLIFYING FUNCTIONS
double phi(double x);
#endif