Algoritma Modified K-MEANS Clustering Pada Penentuan Cluster Centre Berbasis Sum Of Squared Error (SSE)
Lampiran 1. DAFTAR PUBLIKSI ILMIAH PENULIS (TESIS)
Sumatera 4.
Teguh Sujatmiko, Mohammad Ihwani, Gunawan dan Rena Nainggolan
Proceedings of the First International Conference on Computational Science and Information Management (ICoCSIM2012)
ISBN 978-967-0120-60-7 Vol. 1
3-5 Desem ber
2012 Toba
Lake, North
Data Security System From Attacks Man In The Middle (MITM) Electronic Mail Based Encryption In Cryptography
Sumatera 3.
Oris Krianto Sulaiman, Rena Nainggolan, Mohammad Ihwani dan Hendy Agustino
Proceedings of the First International Conference on Computational Science and Information Management (ICoCSIM2012)
ISBN 978-967-0120-60-7 Vol. 1
3-5 Desem ber
2012 Toba
Lake, North
Cryptography Application Delivery Email Using The Method of Gost
Lake, North
No Judul Artikel Penulis Publiksi (Seminar/Jurnal, dll)
2012 Toba
Waktu publiksi Tempat 1.
The Implementation of Biometric Technology Security System For The Quick Count Method In Election
Rena Nainggolan, Oris Krianto Sulaiman, Teguh Sujatmiko dan Hendy Agustino.
Proceedings of the First International Conference on Computational Science and Information Management (ICoCSIM2012)
ISBN 978-967-0120-60-7 Vol. 1
3-5 Desem ber
Lake, North
2012 Toba
Sumatera 2.
Cloud Computing: Security Design Architecture Cloud Computing
Hendy Agustino P Situmorang, Fenina Adline Twince Tobing, Rena Nainggolan dan Oris Krianto Sulaiman
Proceedings of the First International Conference on Computational Science and Information Management (ICoCSIM2012)
ISBN 978-967-0120-60-7 Vol. 1
3-5 Desem ber
Sumatera
LAMPIRAN
Lampiran 1import operator import math import random Data = [["0.Daniel", "Medan Perjuangan", "TKI ", 33], ["1.Hendrik", "Medan Selayang", "Peg. Swasta", 25], ["2.Rinaldi", "Belawan", "Pedagang", 44], ["3.Marusaha", "Medan Perjuangan", "TKI", 31], ["4.Ana", "Medan Perjuangan", "TKI", 37], ["5.Linda", "Medan Selayang", "Peg. Swasta", 40], ["6.Keanu", "Medan Kota", "Peg. Swasta", 24], ["7.Abadi", "Belawan", "PNS", 42], ["8.Zefri", "Medan Kota", "PNS", 38], ["9.Susan", "Medan Kota", "Therapys", 28], ["10.Herman", "Medan Selayang", "TKI", 27], ["11.Titin", "Medan Selayang", "TKI", 22], ["12.Roma", "Medan Perjuangan", "TKI", 27], ["13.Pidia", "Medan Perjuangan", "Therapys", 30], ["14.Arki", "Medan Kota", "Peg. Swasta", 44], ["15.Asima", "Belawan", "Pedagang", 41], ["16.Darleny", "Belawan", "Pedagang", 24], ["17.Arif", "Belawan", "TKI", 22], ["18.Indah", "Belawan", "Pedagang", 27], ["19.Hendrik", "Medan Selayang", "Peg. Swasta", 26]] Pasien = [] Wilayah = [] JenisPk = [] PCluster = [] Cluster = [] ClusterB = [] IterasiCl = [] Target_Error = 9 Interasi = 50 Partikel = 5 '----------------------------------- WILAYAH -----------------------' for i in Data: Status = 0 if len(Wilayah) == 0: Wilayah.append([i[1], 1]) else: for j in Wilayah: if i[1] == j[0]: Status = 1 j[1] = j[1] + 1 if Status == 0: Wilayah.append([i[1], 1]) Wilayah.sort(key = operator.itemgetter(1), reverse = True) for i in range(len(Wilayah)): Wilayah[i].append(i + 1)
'------------------------------ JENIS PEKERJAAN --------------------' for i in Data: Status = 0 if len(JenisPk) == 0: JenisPk.append([i[2], 1]) else: for j in JenisPk: if i[2] == j[0]: Status = 1 j[1] = j[1] + 1 if Status == 0: JenisPk.append([i[2], 1]) JenisPk.sort(key = operator.itemgetter(1), reverse = True) for i in range(len(JenisPk)): JenisPk[i].append(i + 1) '-------------------------- TAMPILKAN KE LAYAR ---------------------' print("============================================================") for i in Data: 'print("%s - %s - %s - %i" % (i[0], i[1], i[2], i[3]))' print(i) print("\nInisialisasi Data Wilayah") print("============================================================") for i in Wilayah: print(i) print("\nInisialisasi Data Jenis Pekerjaan") print("============================================================") for i in JenisPk: print(i) print("\nInisialisasi Data Pasien") print("============================================================") for i in Pasien: print(i) Cl = [0, 1, 2] for I in range(Interasi): Status = 0 PCluster = [] for p in range(Partikel): Pasien = [] '--------------------------- PASIEN-------------------------' for i in range(len(Data)): for j in Wilayah: if Data[i][1] == j[0]: Wil = j[2] for j in JenisPk: if Data[i][2] == j[0]: JPk = j[2] Pasien.append([Data[i][0], Wil, JPk, Data[i][3]])
'----------------------------- CLUSTER ---------------------- if p != 0: Cl1 = random.randint(0, len(Data)-1) while (True): Cl2 = random.randint(0, len(Data)-1) if Cl1 != Cl2: break while (True): Cl3 = random.randint(0, len(Data)-1) if Cl1 != Cl3 and Cl3 != Cl2: break Cl = [Cl1, Cl2, Cl3] Cluster = [] for i in Cl: for j in Wilayah: if Data[i][1] == j[0]: for j in JenisPk: if Data[i][2] == j[0]: JPk = j[2] Cluster.append([Wil, JPk, Data[i][3]]) print("\nPusat Cluster") print("============================================================") for i in Cluster: print(i) '---------------------- PERHITUNGAN ITERASI-----------------' for i in range(len(Data)): for j in range(len(Cluster)): D = math.sqrt(pow(Pasien[i][1] - Cluster[j][0], 2) + pow(Pasien[i][2] - Cluster[j][1], 2) + pow(Pasien[i][3] - Cluster[j][2], 2)) D = float("%.3f" % D) Pasien[i].append(D) if Pasien[i][4] <= Pasien[i][5]: if Pasien[i][4] <= Pasien[i][6]: Pasien[i].append(1) Pasien[i].append(0) Pasien[i].append(0) elif Pasien[i][4] > Pasien[i][6]: Pasien[i].append(0) Pasien[i].append(0) Pasien[i].append(1) elif Pasien[i][4] > Pasien[i][5]: if Pasien[i][5] <= Pasien[i][6]: Pasien[i].append(0) Pasien[i].append(1) Pasien[i].append(0) elif Pasien[i][5] > Pasien[i][6]: Pasien[i].append(0)
Pasien[i].append(0) Pasien[i].append(1) print("\nJarak setiap data pasien ke Setiap Cluster pada iterasi ke 1") print("============================================================") for i in Pasien: print(i) 'Hitung SSE' SSE = 0 for i in Pasien: SSe = 0 SSE = SSe + pow(i[4], 2) + pow(i[5], 2) + pow(i[6], 2) SSE = SSE / len(Pasien) print("\nSSE =", SSE) l = 0 while (True): '===================== CLUSTER 1 ============' ClusterB = [] CL2 = Cluster for k in range(3): for j in range(len(Cluster)): Jlh = 0 W = 0 for i in Pasien: if i[7+k] == 1: Jlh = Jlh + 1 W = W + i[1+j] W = W / Jlh W = float("%.3f" % W) ClusterB.append(W) Cluster = [[ClusterB[0], ClusterB[1], ClusterB[2]], [ClusterB[3], ClusterB[4], ClusterB[5]], [ClusterB[6], ClusterB[7], ClusterB[8]]] print("\nCluster baru iterasi ke", l + 2) print("============================================================") for i in Cluster: print(i) for i in range(len(Data)): for j in range(len(Cluster)): D = math.sqrt(pow(Pasien[i][1] - Cluster[j][0], 2) + pow(Pasien[i][2] - Cluster[j][1], 2) + pow(Pasien[i][3] - Cluster[j][2], 2)) D = float("%.3f" % D) Pasien[i][4+j] = D if Pasien[i][4] <= Pasien[i][5]: if Pasien[i][4] <= Pasien[i][6]: Pasien[i][7] = 1 Pasien[i][8] = 0 Pasien[i][9] = 0 elif Pasien[i][4] > Pasien[i][6]: Pasien[i][7] = 0 Pasien[i][8] = 0 Pasien[i][9] = 1 elif Pasien[i][4] > Pasien[i][5]: if Pasien[i][5] <= Pasien[i][6]: Pasien[i][7] = 0 Pasien[i][8] = 1 Pasien[i][9] = 0 elif Pasien[i][5] > Pasien[i][6]: Pasien[i][7] = 0 Pasien[i][8] = 0 Pasien[i][9] = 1 print("\nJarak setiap data pasien ke Setiap Cluster pada iterasi ke", l + 2) print("============================================================") for i in Pasien: if CL2 == Cluster: break else: l = l + 1 'Hitung SSE' SSE = 0 for i in Pasien: SSe = 0 SSE = SSe + pow(i[4], 2) + pow(i[5], 2) + pow(i[6], 2) SSE = SSE / len(Pasien) print("\nSSE =", SSE) PCluster.append([Cl[0], Cl[1], Cl[2], SSE]) print("") for i in range(len(PCluster)): print("Partikel", i+1, "=", PCluster[i]) PCluster.sort(key = operator.itemgetter(3)) print("") for i in range(len(PCluster)): print("Partikel", i+1, "=", PCluster[i]) Cl = [PCluster[0][0], PCluster[0][1], PCluster[0][2]] IterasiCl.append(PCluster[0]) print("") for i in range(len(IterasiCl)): print("Iterasi", i+1, "=", IterasiCl[i])
Lampiran 2
306.8306 6,11,17 [4, 2, 24][3, 1, 22][1, 1, 22] 327.1982 17,2,15 [1, 1, 22][1, 3, 44][1, 3, 41] 358.9849
13,14,18 [2, 5, 30][4, 2, 44][1, 3, 27] 306.8306 9 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533 301.0533
3,11,15 [1, 1, 22][1, 3, 44][1, 3, 44] 327.1982 14,6,9 [4, 2, 44][4, 2, 24][4, 5, 28] 312.7001
301.0533 0,18,2 [2, 1, 33][1, 3, 27][1, 1, 22] 332.5600
4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533 6,19,15 [4, 2, 24][3, 2, 26][1, 3, 41] 327.1982 8 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
16,18,3 [1, 3, 24][1, 3, 27][2, 1, 31] 327.1982 19,16,1 [3, 2, 26][1, 3, 24][3, 2, 25] 327.1982
11,8,7 [3, 1, 22][4, 4, 38][1, 4, 42] 332.5657 7 1,5,13 [3, 2, 25][3, 2, 40][2, 5, 30] 306.8306 306.8306
18,11,13 [1, 3, 27][3, 1, 22][2, 5, 30] 327.1982 1,16,18 [3, 2, 25][1, 3, 24][1, 3, 27] 327.1982
306.8306 18,4,8 [1, 3, 27][2, 1, 37][4, 4, 38] 314.2185
3,8,14 [2, 1, 31][4, 4, 38][4, 2, 44] 358.9849 11,4,8 [3, 1, 22][2, 1, 37][4, 4, 38] 315.0354 6 1,5,13 [3, 2, 25][3, 2, 40][2, 5, 30] 306.8306
3,4,0 [2, 1, 31][2, 1, 37][2, 1, 33] 314.2185 6,14,10 [4, 2, 24][4, 2, 44][3, 1, 27] 327.1982 5 1,5,13 [3, 2, 25][3, 2, 40][2, 5, 30] 306.8306
Nilai SSE pada 20 Iterasi Iterasi
12,1,4 [2, 1, 27][3, 2, 25][2, 1, 37] 327.1982 5,15,17 [3, 2, 40][1, 3, 41][1, 1, 22] 358.9849
7,17,18 [1, 4, 42][1, 1, 22][1, 3, 27] 327.1982 4 1,5,13 [3, 2, 25][3, 2, 40][2, 5, 30] 306.8306 306.8306
1,5,13 [3, 2, 25][3, 2, 40][2, 5, 30] 306.8306 8,6,19 [4, 4, 38][4, 2, 24][3, 2, 26] 327.1982
306.8306 1,19,12 [3, 2, 25][3, 2, 26][2, 1, 27] 327.1982
1,17,0 [3, 2, 25][1, 1, 22][2, 1, 33] 327.1982 14,16,2 [4, 2, 44][1, 3, 24][1, 3, 44] 358.9849 3 13,0,15 [2, 5, 30][2, 1, 33][1, 3, 41] 314.2185
314.2185 13,0,15 [2, 5, 30][2, 1, 33][1, 3, 41] 314.2185 11,7,15 [3, 1, 22][1, 4, 42][1, 3, 41] 358.9849
4,18,2 [2, 1, 37][1, 3, 27][1, 3, 44] 358.9849 16,10,9 [1, 3, 24][3, 1, 27][4, 5, 28] 327.1982 2 0,1,2 [2, 1, 33][3, 1, 22][1, 3, 44] 315.0354
0,11,2 [2, 1, 33][3, 1, 22][1, 3, 44] 315.0354 19,10,0 [3, 2, 26][3, 1, 27][2, 1, 33] 327.1982
Data Pusat Cluster Nilai SSE SSE Min 1 0,1,2 [2, 1, 33][3, 2, 25][1, 3, 44] 332.5657 315.0354
8,15,5 [4, 4, 38][1, 3, 41][3, 2, 40] 358.9849
12,1,18 [2, 1, 27][3, 2, 25][1, 3, 27] 315.0354 8,11,6 [4, 4, 38][1, 3, 44][4, 2, 24] 327.1982 5,18,1 [3, 2, 40][1, 1, 27][3, 2, 25] 312.7001 10 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 0,19,15 [2, 1, 33][3, 2, 26][1, 3, 41] 315.0354 5,16,13 [3, 2, 40][1, 3, 24][2, 5, 30] 306.8306
1,15,4 [3, 2, 40][2, 1, 37][1, 3, 24] 332.5600 12,10,4 [3, 1, 27][4, 2, 44][2, 1, 27] 327.1982
1,5,17 [1, 4, 42][2, 1, 27][3, 2, 40] 327.1982 18 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533 301.0533
4,9,2 [1, 3, 44][1, 3, 41][3, 2, 25] 358.9849 19,6,16 [2, 1, 37][4, 4, 38][3, 1, 27] 327.1982
301.0533 9,17,14 [1, 4, 42][4, 4, 38][1, 3, 24] 327.1982
12,13,3 [2, 1, 27][3, 2, 25][1, 3, 27] 306.8306 14,18,4 [4, 4, 38][3, 1, 22][4, 2, 24] 358.9849 11,19,5 [3, 2, 40][1, 3, 27][3, 2, 25] 327.1982 17 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 0,15,3 [4, 4, 38][1, 3, 41][3, 2, 40] 314.2185
12,5,3 [2, 1, 27][3, 2, 40][2, 1, 31] 301.0533 4,10,11 [2, 1, 37][3, 1, 27][3, 1, 22] 327.1982 16 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
0,1,5 [2, 1, 33][3, 2, 25][3, 2, 40] 301.0533 10,0,14 [3, 1, 27][2, 1, 33][4, 2, 44] 332.5657 16,3,13 [1, 3, 24][2, 1, 37][2, 5, 30] 306.8306 15 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 7,8,16 [1, 4, 42][4, 4, 38][1, 3, 24] 358.9849 2,15,1 [1, 3, 44][1, 3, 41][3, 2, 25] 358.9849 4,8,10 [2, 1, 37][4, 4, 38][3, 1, 27] 314.2185 7,12,5 [1, 4, 42][2, 1, 27][3, 2, 40] 358.9849 11 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 8,12,11 [4, 4, 38][2, 1, 27][3, 1, 22] 327.1982
6,1,9 [4, 2, 24][3, 2, 25][4, 5, 28] 327.1982 7,9,13 [4, 4, 38][4, 5, 28][2, 5, 30] 301.0533 14 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
8,3,7 [4, 4, 38][2, 1, 37][1, 4, 42] 358.9849 12,15,13 [2, 1, 27][2, 1, 37][2, 5, 30] 306.8306
15,9,6 [1, 3, 41][4, 5, 28][4, 2, 24] 312.7001 13 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533 301.0533
0,12,11 [2, 1, 37][2, 1, 27][3, 1, 22] 327.1982 14,11,6 [4, 2, 44][3, 1, 22][4, 2, 24] 327.1982
301.0533 19,7,2 [3, 2, 26][1, 4, 42][1, 3, 44] 358.9849
10,14,12 [3, 1, 27][4, 2, 44][2, 1, 27] 327.1982 17,0,16 [1, 1, 22][2, 1, 33][1, 3, 24] 327.1982 4,19,16 [2, 1, 37][3, 2, 26][1, 3, 24] 327.1982 12 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 5,4,16 [3, 2, 40][2, 1, 37][1, 3, 24] 314.2185
8,11,5 [1, 1, 22][2, 1, 33][1, 3, 24] 332.5657
3,17,0 [2, 1, 37][3, 2, 26][1, 3, 24] 327.1982
19 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 19,5,8 [3, 2, 26][1, 4, 42][1, 3, 44] 332.5600 1,0,15 [2, 1, 33][2, 1, 27][3, 1, 22] 315.0354
4,15,10 [4, 2, 44][3, 1, 22][4, 2, 24] 336.7090 3,13,6 [1, 3, 41][4, 5, 28][4, 2, 24] 312.7001 20 4,0,10 [2, 1, 37][2, 1, 33][3, 1, 27] 301.0533
301.0533 7,10,3 [4, 4, 38][2, 1, 31][1, 4, 42] 301.0533
13,6,19 [2, 1, 27][1, 3, 41][2, 5, 30] 327.1982 9,7,5 [4, 2, 24][3, 2, 25][4, 5, 28] 358.9849
0,17,2 [1, 4, 42][4, 5, 28][2, 5, 30] 315.0354