Skip to content

Commit ed27f67

Browse files
authored
Add files via upload
1 parent aa41bde commit ed27f67

File tree

14 files changed

+847
-0
lines changed

14 files changed

+847
-0
lines changed
164 KB
Binary file not shown.
27.5 KB
Binary file not shown.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
In every of the above i used :
2+
mdl.Prior = struct('ClassNames',[2, 4],'ClassProbs',[0.655; 0.345]);
3+
4+
5+
Type your choice : BAYES
6+
mdl = fitcnb(X, Y);
7+
costs : 0.1 , 0.9
8+
-----------------------------------------
9+
|Total Predicted = 699, K-fold with K = 10
10+
|Total time for K-fold = 0.756419 secs
11+
|Total True Positive = 237
12+
|Total True Negative = 435
13+
|Total False Positive = 23
14+
|Total False Negative = 4
15+
|Accuracy = 96.137%
16+
|Sensitivity = 98.340%
17+
|Specificity = 94.978%
18+
------------------------------------------
19+
20+
Type your choice : BAYES
21+
mdl = fitcnb(X, Y);
22+
costs : 0.25 , 0.75
23+
-----------------------------------------
24+
|Total Predicted = 699, K-fold with K = 10
25+
|Total time for K-fold = 0.723786 secs
26+
|Total True Positive = 237
27+
|Total True Negative = 436
28+
|Total False Positive = 22
29+
|Total False Negative = 4
30+
|Accuracy = 96.280%
31+
|Sensitivity = 98.340%
32+
|Specificity = 95.197%
33+
------------------------------------------
34+
35+
Type your choice : BAYES
36+
mdl = fitcnb(X, Y);
37+
costs : 0.2 , 0.8
38+
-----------------------------------------
39+
|Total Predicted = 699, K-fold with K = 10
40+
|Total time for K-fold = 0.860953 secs
41+
|Total True Positive = 236
42+
|Total True Negative = 436
43+
|Total False Positive = 22
44+
|Total False Negative = 5
45+
|Accuracy = 96.137%
46+
|Sensitivity = 97.925%
47+
|Specificity = 95.197%
48+
------------------------------------------
49+
50+
51+
Type your choice : BAYES
52+
mdl = fitcnb(X, Y,'DistributionNames','kernel','Kernel','normal');
53+
costs : 0.25 , 0.75
54+
-----------------------------------------
55+
|Total Predicted = 699, K-fold with K = 10
56+
|Total time for K-fold = 1.238566 secs
57+
|Total True Positive = 232
58+
|Total True Negative = 443
59+
|Total False Positive = 15
60+
|Total False Negative = 9
61+
|Accuracy = 96.567%
62+
|Sensitivity = 96.266%
63+
|Specificity = 96.725%
64+
------------------------------------------
65+
66+
Type your choice : BAYES
67+
mdl = fitcnb(X, Y,'DistributionNames','kernel', 'Kernel', 'box');
68+
costs : 0.25 , 0.75
69+
-----------------------------------------
70+
|Total Predicted = 699, K-fold with K = 10
71+
|Total time for K-fold = 1.302383 secs
72+
|Total True Positive = 233
73+
|Total True Negative = 443
74+
|Total False Positive = 15
75+
|Total False Negative = 8
76+
|Accuracy = 96.710%
77+
|Sensitivity = 96.680%
78+
|Specificity = 96.725%
79+
------------------------------------------
80+
81+
82+
Type your choice : BAYES
83+
mdl = fitcnb(X, Y,'DistributionNames','kernel', 'Kernel', 'triangle');
84+
costs : 0.25 , 0.75
85+
-----------------------------------------
86+
|Total Predicted = 699, K-fold with K = 10
87+
|Total time for K-fold = 1.169238 secs
88+
|Total True Positive = 232
89+
|Total True Negative = 445
90+
|Total False Positive = 13
91+
|Total False Negative = 9
92+
|Accuracy = 96.853%
93+
|Sensitivity = 96.266%
94+
|Specificity = 97.162%
95+
------------------------------------------
96+
97+
Type your choice : BAYES
98+
mdl = fitcnb(X, Y,'CategoricalPredictors', 'all', 'DistributionNames', 'mvmn');
99+
costs : 0.25 , 0.75
100+
-----------------------------------------
101+
|Total Predicted = 699, K-fold with K = 10
102+
|Total time for K-fold = 0.792678 secs
103+
|Total True Positive = 239
104+
|Total True Negative = 443
105+
|Total False Positive = 15
106+
|Total False Negative = 2
107+
|Accuracy = 97.568%
108+
|Sensitivity = 99.170%
109+
|Specificity = 96.725%
110+
------------------------------------------
111+
112+
113+
Type your choice : BAYES
114+
mdl = fitcnb(X, Y,'DistributionNames','normal');
115+
-----------------------------------------
116+
|Total Predicted = 699, K-fold with K = 10
117+
|Total time for K-fold = 0.800770 secs
118+
|Total True Positive = 235
119+
|Total True Negative = 436
120+
|Total False Positive = 22
121+
|Total False Negative = 6
122+
|Accuracy = 95.994%
123+
|Sensitivity = 97.510%
124+
|Specificity = 95.197%
125+
------------------------------------------
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Type your choice : DTree
2+
3+
-----------------------------------------
4+
|Total Predicted = 699, K-fold with K = 10
5+
|Total time for K-fold = 0.091613 secs
6+
|Total True Positive = 233
7+
|Total True Negative = 432
8+
|Total False Positive = 26
9+
|Total False Negative = 8
10+
|Accuracy = 95.136%
11+
|Sensitivity = 96.680%
12+
|Specificity = 94.323%
13+
------------------------------------------
14+
15+
Type your choice : DTree
16+
mdl = fitctree(X, Y, 'Cost', [0 0.25; 0.75 0], 'AlgorithmForCategorical','Exact');
17+
-----------------------------------------
18+
|Total Predicted = 699, K-fold with K = 10
19+
|Total time for K-fold = 0.095682 secs
20+
|Total True Positive = 229
21+
|Total True Negative = 428
22+
|Total False Positive = 30
23+
|Total False Negative = 12
24+
|Accuracy = 93.991%
25+
|Sensitivity = 95.021%
26+
|Specificity = 93.450%
27+
------------------------------------------
28+
29+
Type your choice : DTree
30+
mdl = fitctree(X, Y, 'Cost', [0 0.25; 0.75 0], 'AlgorithmForCategorical','PullLeft');
31+
-----------------------------------------
32+
|Total Predicted = 699, K-fold with K = 10
33+
|Total time for K-fold = 0.093547 secs
34+
|Total True Positive = 231
35+
|Total True Negative = 434
36+
|Total False Positive = 24
37+
|Total False Negative = 10
38+
|Accuracy = 95.136%
39+
|Sensitivity = 95.851%
40+
|Specificity = 94.760%
41+
------------------------------------------
42+
43+
Type your choice : DTree
44+
mdl = fitctree(X, Y, 'Cost', [0 0.25; 0.75 0], 'AlgorithmForCategorical','PCA');
45+
-----------------------------------------
46+
|Total Predicted = 699, K-fold with K = 10
47+
|Total time for K-fold = 0.093534 secs
48+
|Total True Positive = 227
49+
|Total True Negative = 434
50+
|Total False Positive = 24
51+
|Total False Negative = 14
52+
|Accuracy = 94.564%
53+
|Sensitivity = 94.191%
54+
|Specificity = 94.760%
55+
------------------------------------------
56+
57+
Type your choice : DTree
58+
mdl = fitctree(X, Y, 'Cost', [0 0.25; 0.75 0], 'AlgorithmForCategorical','OVAbyClass');
59+
-----------------------------------------
60+
|Total Predicted = 699, K-fold with K = 10
61+
|Total time for K-fold = 0.097533 secs
62+
|Total True Positive = 228
63+
|Total True Negative = 434
64+
|Total False Positive = 24
65+
|Total False Negative = 13
66+
|Accuracy = 94.707%
67+
|Sensitivity = 94.606%
68+
|Specificity = 94.760%
69+
------------------------------------------
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
3 = ceil(log(699))
2+
-----------------------------------------
3+
|Total Predicted = 699, K-fold with K = 10
4+
|Total True Positive = 232
5+
|Total True Negative = 445
6+
|Total False Positive = 13
7+
|Total False Negative = 9
8+
|Accuracy = 9.685265e-01
9+
|Sensitivity = 9.626556e-01
10+
|Specificity = 9.716157e-01
11+
------------------------------------------
12+
13+
5
14+
-----------------------------------------
15+
|Total Predicted = 699, K-fold with K = 10
16+
|Total True Positive = 234
17+
|Total True Negative = 446
18+
|Total False Positive = 12
19+
|Total False Negative = 7
20+
|Accuracy = 9.728183e-01
21+
|Sensitivity = 9.709544e-01
22+
|Specificity = 9.737991e-01
23+
------------------------------------------
24+
25+
10
26+
-----------------------------------------
27+
|Total Predicted = 699, K-fold with K = 10
28+
|Total True Positive = 229
29+
|Total True Negative = 446
30+
|Total False Positive = 12
31+
|Total False Negative = 12
32+
|Accuracy = 9.656652e-01
33+
|Sensitivity = 9.502075e-01
34+
|Specificity = 9.737991e-01
35+
------------------------------------------
36+
37+
20
38+
-----------------------------------------
39+
|Total Predicted = 699, K-fold with K = 10
40+
|Total True Positive = 226
41+
|Total True Negative = 448
42+
|Total False Positive = 10
43+
|Total False Negative = 15
44+
|Accuracy = 9.642346e-01
45+
|Sensitivity = 9.377593e-01
46+
|Specificity = 9.781659e-01
47+
------------------------------------------
48+
49+
26 = sqrt(699)
50+
-----------------------------------------
51+
|Total Predicted = 699, K-fold with K = 10
52+
|Total True Positive = 225
53+
|Total True Negative = 448
54+
|Total False Positive = 10
55+
|Total False Negative = 16
56+
|Accuracy = 9.628040e-01
57+
|Sensitivity = 9.336100e-01
58+
|Specificity = 9.781659e-01
59+
------------------------------------------
60+
61+
30
62+
-----------------------------------------
63+
|Total Predicted = 699, K-fold with K = 10
64+
|Total True Positive = 224
65+
|Total True Negative = 447
66+
|Total False Positive = 11
67+
|Total False Negative = 17
68+
|Accuracy = 9.599428e-01
69+
|Sensitivity = 9.294606e-01
70+
|Specificity = 9.759825e-01
71+
------------------------------------------
72+
73+
74+
40
75+
-----------------------------------------
76+
|Total Predicted = 699, K-fold with K = 10
77+
|Total True Positive = 222
78+
|Total True Negative = 448
79+
|Total False Positive = 10
80+
|Total False Negative = 19
81+
|Accuracy = 9.585122e-01
82+
|Sensitivity = 9.211618e-01
83+
|Specificity = 9.781659e-01
84+
------------------------------------------
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Used minkowski distance
2+
3+
Choose K for KNN : 5
4+
-----------------------------------------
5+
|Total Predicted = 699, K-fold with K = 10
6+
|Total time for K-fold = 0.087527 secs
7+
|Total True Positive = 234
8+
|Total True Negative = 447
9+
|Total False Positive = 11
10+
|Total False Negative = 7
11+
|Accuracy = 97.425%
12+
|Sensitivity = 97.095%
13+
|Specificity = 97.598%
14+
------------------------------------------
15+
16+
Choose K for KNN : 7
17+
-----------------------------------------
18+
|Total Predicted = 699, K-fold with K = 10
19+
|Total time for K-fold = 0.091131 secs
20+
|Total True Positive = 229
21+
|Total True Negative = 447
22+
|Total False Positive = 11
23+
|Total False Negative = 12
24+
|Accuracy = 96.710%
25+
|Sensitivity = 95.021%
26+
|Specificity = 97.598%
27+
------------------------------------------
28+
29+
Choose K for KNN : 10
30+
-----------------------------------------
31+
|Total Predicted = 699, K-fold with K = 10
32+
|Total time for K-fold = 0.088568 secs
33+
|Total True Positive = 229
34+
|Total True Negative = 447
35+
|Total False Positive = 11
36+
|Total False Negative = 12
37+
|Accuracy = 96.710%
38+
|Sensitivity = 95.021%
39+
|Specificity = 97.598%
40+
------------------------------------------
41+
42+
Choose K for KNN : 13
43+
-----------------------------------------
44+
|Total Predicted = 699, K-fold with K = 10
45+
|Total time for K-fold = 0.091935 secs
46+
|Total True Positive = 231
47+
|Total True Negative = 447
48+
|Total False Positive = 11
49+
|Total False Negative = 10
50+
|Accuracy = 96.996%
51+
|Sensitivity = 95.851%
52+
|Specificity = 97.598%
53+
------------------------------------------

0 commit comments

Comments
 (0)