Professional Documents
Culture Documents
PerhitunganC NBCJ
PerhitunganC NBCJ
net/publication/346508593
CITATIONS READS
0 3,058
1 author:
Hairani Hairani
Universitas Bumigora
39 PUBLICATIONS 143 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Hairani Hairani on 01 December 2020.
22 1 Tested Negative
22 2 Tested Negative
22 1 Tested Negative
26 5 Tested Negative
23 4 Tested Negative
26 3 Tested Positive
37 5 Tested Positive
31 7 Tested Positive
26 4 Tested Positive
22 4 Tested Positive
22 1 Tested Negative
𝑛. (∑ 𝑋𝑌) − (∑ 𝑋). (∑ 𝑌)
𝑟=
√(𝑛. ∑ 𝑋 2 − (∑ 𝑋)2 )√(𝑛. ∑ 𝑌 2 − (∑ 𝑌)2 )
10. (399) − (257). (15)
𝑟=
√(10 ∗ 6823) − ((257)2 √(10 ∗ 25) − (15)2
3990 − 3855
𝑟=
√(68230 − 66049)√(250) − 225
135
𝑟=
√2181√25
135
𝑟=
46,701 ∗ 5
135
𝑟=
233,505
𝑟 𝐴𝑔𝑒(𝑋1) = 0,578
Dari nilai r Atribut Age(X1) diatas kita jadikan nilai korelasi R-Square dengan Rumus:
𝑅 𝑆𝑞𝑢𝑎𝑟𝑒 = 𝑟 2
𝑅 𝑆𝑞𝑢𝑎𝑟𝑒 = 0,5782
𝑅 𝑆𝑞𝑢𝑎𝑟 (𝐴𝑔𝑒) = 0,334
Kita dapatkan nilai Korelasi R Square Age (X1) sebesar 0,334
b. Perhitungan Korelasi Atribut Number time of Pregnant (X2) dengan kelasnya (Y)
𝑛. (∑ 𝑋𝑌) − (∑ 𝑋). (∑ 𝑌)
𝑟=
√(𝑛. ∑ 𝑋 2 − (∑ 𝑋)2 )√(𝑛. ∑ 𝑌 2 − (∑ 𝑌)2 )
10. (𝟓𝟗) − (𝟑𝟔). (15)
𝑟=
√(10 ∗ 𝟏𝟔𝟐) − ((𝟑𝟔)2 √(10 ∗ 25) − (15)2
590 − 540
𝑟=
√(1620 − 1296)√(250) − 225
50
𝑟=
√324√25
50
𝑟=
18 ∗ 5
50
𝑟=
90
𝑟 Number time of Pregnant (𝐗𝟐) = 0,555
Dari nilai r Atribut Number time of Pregnant (X2) diatas kita jadikan nilai korelasi R-
Square dengan Rumus:
𝑅 𝑆𝑞𝑢𝑎𝑟𝑒 = 𝑟 2
𝑅 𝑆𝑞𝑢𝑎𝑟𝑒 = 0,5552
𝑅 𝑆𝑞𝑢𝑎𝑟 (𝐴𝑔𝑒) = 0,308
Kita dapatkan nilai Korelasi R Square Number time of Pregnant (X2) sebesar 0,308
Atribut R Square
Prior Probability
Sum Class N
Tested Positive
5 10
Tested Negative 5
5
P(X |Tested Positive ) = = 0,5
10
5
P(X |Tested Negative )= = 0,5
10
Langkah 4 : Menghitung probabilitas independen kelas Y dari semua fitur dalam vektor X:
Lihat Tabel 3.2 Data Training dan Tabel 3.3 Data Testing.
1+1
P(𝑇𝑒𝑠𝑡𝑒𝑑 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒|Age = 22) = = 0,4
5
3+1
P(Tested Negative|Age = 22) = = 0,8
5
0+1
P(𝑇𝑒𝑠𝑡𝑒𝑑 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒|𝑁𝑢𝑚𝑏𝑒𝑟 𝑡𝑖𝑚𝑒𝑠 𝑜𝑓 𝑝𝑟𝑒𝑔𝑛𝑎𝑛𝑡 = 1) = = 0,2
5
2+1
P(𝑇𝑒𝑠𝑡𝑒𝑑 𝑁𝑒𝑔𝑎𝑡𝑖𝑣𝑒|𝑁𝑢𝑚𝑏𝑒𝑟 𝑡𝑖𝑚𝑒𝑠 𝑜𝑓 𝑝𝑟𝑒𝑔𝑛𝑎𝑛𝑡 = 1) = = 0,6
5
• Langkah 4 :Menghitung perkalian:
P(Kelas Tested Positive |X) = (P(Kelas Tested Positive |Age=22) * R(Kelas Tested Positive |Age = 22)) +
(P(Kelas Tested Positive |Number Times of Pregnant = 1) * R(Kelas Tested Positive |Number
Times of Pregnant=1)) * P(X| Tested Positive) = (0,4 * 0,334) + (0,2 * 0,308) * 0,5 = 0.1644
P(Kelas Tested Negative |X) = (P(Kelas Tested Negative |Age=22) * R(Kelas Tested Negative |Age = 22)) +
(P(Kelas Tested Negative | Number Times of Pregnant = 1) * R(Kelas Tested Negative | Number
Times of Pregnant = 1)) * P(X| Tested Negative) = (0,8 * 0,334) + (0,6 * 0,308) * 0,5 =0.3596
• Langkah 5 : Menghitung nilai max dari probabilitas akhir:
P(ClassTested Positive|X) = 0,1644
P(ClassTested Negative|X) = 0,3596
Nilai probabilitas kelas Tested Negative lebih besar dari nilai probabilitas kelas Tested Positive, sehingga
data tersebut diklasifikasikan ke dalam kelas Tested Negative.