-
Notifications
You must be signed in to change notification settings - Fork 13
/
README
42 lines (30 loc) · 1.24 KB
/
README
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
Kernel Density Estimation
-------------------------
(c) Tim Nugent 2014
Based on Philipp K. Janert's Perl module:
http://search.cpan.org/~janert/Statistics-KernelEstimation-0.05
Multivariate stuff from here:
http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/ebooks/html/spm/spmhtmlnode18.html
Compile by running 'make'. Uses -std=c++11 - on older compilers you may need to change this to -std=c++0x in the Makefile.
Run all tests with 'make test'. This calls an R script which generates plots from various .csv file. The multivariate data in the data/ directory is the Old Faithful geyser eruption/waiting data.
Example usage:
./kerndens data/univariate.csv > uni_pdf.csv
To plot this in R:
data <- read.table("uni_pdf.csv", header=FALSE, sep="," ,comment.char="#")
plot(data$V1,data$V2,xlab="x",ylab="density",main="Univariate PDF")
Full options:
Usage:
./kerndens [options] [csv_file]
Options:
-k <int> Kernel type:
1 = Gaussian (default)
2 = Box
3 = Epanechnikov
-b <int> Bandwidth optimisation (Gaussian only):
1 = Default
2 = AMISE optimal, secant method
3 = AMISE optimal, bisection method
-p <int> Calculate:
1 = PDF (default)
2 = CDF