-
Notifications
You must be signed in to change notification settings - Fork 5
/
gda_data.h
41 lines (26 loc) · 1.4 KB
/
gda_data.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
//
// Created by Xun Li on 2019-11-27.
//
#ifndef GEODA_GDA_DATA_H
#define GEODA_GDA_DATA_H
#include <vector>
// APIs for data processing
std::vector<std::vector<double> > gda_demean(const std::vector<std::vector<double> >& data);
std::vector<std::vector<double> > gda_standardize(const std::vector<std::vector<double> >& data);
std::vector<std::vector<double> > gda_standardize_mad(const std::vector<std::vector<double> >& data);
std::vector<double> gda_naturalbreaks(int k, const std::vector<double>& data,
const std::vector<bool>& undefs);
std::vector<double> gda_quantilebreaks(int k, const std::vector<double>& data,
const std::vector<bool>& undefs);
std::vector<double> gda_hinge15breaks(const std::vector<double>& data,
const std::vector<bool>& undefs);
std::vector<double> gda_hinge30breaks(const std::vector<double>& data,
const std::vector<bool>& undefs);
std::vector<double> gda_percentilebreaks(const std::vector<double>& data,
const std::vector<bool>& undefs);
std::vector<double> gda_stddevbreaks( const std::vector<double>& data,
const std::vector<bool>& undefs);
void gda_transform_inplace(std::vector<double>& vals, const std::string& method);
bool gda_rateStandardizeEB(const std::vector<double>& P, const std::vector<double>& E,
std::vector<double>& results, std::vector<bool> &undefined);
#endif //GEODA_GDA_DATA_H