-
Notifications
You must be signed in to change notification settings - Fork 0
/
Documentation.txt
33 lines (24 loc) · 1.18 KB
/
Documentation.txt
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
Data Processing:
Missing values in dataset were handle by assigning a value of .000001. Instead of 0, this value
will prevent the total probablity from being 0.
Continuous values are treated with a probability density function. All continuous data are assumed to have
a continuous distribution. Average and Variance are calculate of each classifier and its respective attributes.
It is then plugged in to a function getContinuoutP, which outputs the probability of that value.
getContinuousP is the probabilty density function.
public double getContinuousP(String value, double average, double variance) {
double x = Double.parseDouble(value);
double term1 = Math.sqrt(2 * Math.PI * variance);
term1 = 1 / term1;
double term2 = (x - average);
term2 = Math.pow(term2, 2);
term2 = (term2 / variance) * (-.5);
term2 = Math.exp(term2);
return term1 * term2;
}
Evaluation:
1. Accuracy: 0.7594065792302731
2. Accuracy: 0.7623091808213287
3. Accuracy: 0.7597290905181682
4. Accuracy: 0.7566114814018491
5. Accuracy: 0.7624166845839604
Five cross validation accuracy (average): 0.7600946033111159