Corona Whisky
Wiski (bahasa Inggris: whisky dari bahasa Gaelik Skotlandia, atau whiskey dari bahasa Irlandia, fuisce) merujuk secara luas kepada kategori minuman beralkohol dari fermentasi serealia yang mengalami proses mashing (dihaluskan, dicampur air serta dipanaskan), dan hasilnya melalui proses distilasi sebelum dimatangkan dengan cara disimpan di dalam tong kecil dari kayu (biasanya kayu ek).
Jenis wiski yang dihasilkan bergantung jenis serealia yang dipakai sebagai bahan baku, yakni jelai, malt (jelai yang dikecambahkan), gandum hitam (rye), rye yang dikecambahkan, gandum, dan jagung. Wiski berasal dari bahasa Gaulia untuk “air” (uisce atau uisge). Di Skotlandia disebut uisge-beatha, sedangkan di Irlandia disebut uisce beatha yang berarti “air kehidupan”. Keduanya berkaitan dengan bahasa Latin aqua vitae yang juga berarti “air kehidupan”.[1] Orang Skotlandia menulisnya sebagai whisky sedangkan orang Irlandia menulisnya sebagai whiskey (ditambah huruf “e”).
Catatan yang tertua tentang wiski berasal dari tahun 1405 di Irlandia,[2] yang menceritakan wiski dibuat para biarawan.[1] Hal yang sama juga dicatat di Skotlandia pada tahun 1496.[3] Walaupun demikian, wiski diperkirakan sudah ada paling sedikit beberapa ratus tahun sebelumnya. Pada waktu itu, wiski dibuat di banyak tempat, dan tidak dicatat secara khusus. Akibatnya, tahun pertama kali wiski dibuat serta tempat asalnya tidak diketahui. Selain itu, ada kemungkinan berbagai kelompok orang yang tidak ada kaitannya satu sama lain, secara terpisah menemukan proses distilasi.
Tungku distilasi dan tong wiski skotch Sejarawan memperkirakan minuman keras hasil distilasi pertama kali dibuat antara abad ke-8 dan abad ke-9 di Timur Tengah.[4] Teknik distilasi dibawa ke Irlandia dan Britania oleh biarawan Kristen. Menurut legenda yang populer, Santo Patrick memperkenalkan proses distilasi di Irlandia dan Britania. Proses distilasi mungkin ditemukan orang Irlandia, atau petani di Britania yang memanfaatkan sisa-sisa serealia sesudah panen.
Analisa data whiskies ini adalah sebagai bahan latihan yang ditugaskan oleh Algoritma Data Science untuk materi Unsupervised Learning. Mudah-mudahan dengan tugas latihan yang kami kerjakan dapat melatih dan memahami materi lebih baik lagi. Sekaligus memberi pengetahuan baru dari sudut padang yang baru.
## RowID Distillery Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey
## 1 1 Aberfeldy 2 2 2 0 0 2 1 2
## 2 2 Aberlour 3 3 1 0 0 4 3 2
## 3 3 AnCnoc 1 3 2 0 0 2 0 0
## 4 4 Ardbeg 4 1 4 4 0 0 2 0
## 5 5 Ardmore 2 2 2 0 0 1 1 1
## 6 6 ArranIsleOf 2 3 1 1 0 1 1 1
## Nutty Malty Fruity Floral Postcode Latitude Longitude
## 1 2 2 2 2 \tPH15 2EB 286580 749680
## 2 2 3 3 2 \tAB38 9PJ 326340 842570
## 3 2 2 3 2 \tAB5 5LI 352960 839320
## 4 1 2 1 0 \tPA42 7EB 141560 646220
## 5 2 3 1 1 \tAB54 4NH 355350 829140
## 6 0 1 1 2 KA27 8HJ 194050 649950
## 'data.frame': 86 obs. of 17 variables:
## $ RowID : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Distillery: Factor w/ 86 levels "Aberfeldy","Aberlour",..: 1 2 3 4 5 6 7 8 9 10 ...
## $ Body : int 2 3 1 4 2 2 0 2 2 2 ...
## $ Sweetness : int 2 3 3 1 2 3 2 3 2 3 ...
## $ Smoky : int 2 1 2 4 2 1 0 1 1 2 ...
## $ Medicinal : int 0 0 0 4 0 1 0 0 0 1 ...
## $ Tobacco : int 0 0 0 0 0 0 0 0 0 0 ...
## $ Honey : int 2 4 2 0 1 1 1 2 1 0 ...
## $ Spicy : int 1 3 0 2 1 1 1 1 0 2 ...
## $ Winey : int 2 2 0 0 1 1 0 2 0 0 ...
## $ Nutty : int 2 2 2 1 2 0 2 2 2 2 ...
## $ Malty : int 2 3 2 2 3 1 2 2 2 1 ...
## $ Fruity : int 2 3 3 1 1 1 3 2 2 2 ...
## $ Floral : int 2 2 2 0 1 2 3 1 2 1 ...
## $ Postcode : Factor w/ 85 levels " \tAB38 7RE",..: 19 4 5 16 6 68 54 8 7 12 ...
## $ Latitude : int 286580 326340 352960 141560 355350 194050 247670 340754 340754 270820 ...
## $ Longitude : num 749680 842570 839320 646220 829140 ...
Cek NA :
## RowID Distillery Body Sweetness Smoky Medicinal Tobacco
## 0 0 0 0 0 0 0
## Honey Spicy Winey Nutty Malty Fruity Floral
## 0 0 0 0 0 0 0
## Postcode Latitude Longitude
## 0 0 0
Mengetahui porsi sebaran data whiskies secara keseluruhan
##
## Aberfeldy Aberlour AnCnoc Ardbeg
## 1 1 1 1
## Ardmore ArranIsleOf Auchentoshan Auchroisk
## 1 1 1 1
## Aultmore Balblair Balmenach Belvenie
## 1 1 1 1
## BenNevis Benriach Benrinnes Benromach
## 1 1 1 1
## Bladnoch BlairAthol Bowmore Bruichladdich
## 1 1 1 1
## Bunnahabhain Caol Ila Cardhu Clynelish
## 1 1 1 1
## Corona Craigallechie Craigganmore Dailuaine
## 1 1 1 1
## Dalmore Dalwhinnie Deanston Dufftown
## 1 1 1 1
## Edradour Glenallachie GlenDeveronMacduff Glendronach
## 1 1 1 1
## Glendullan GlenElgin Glenfarclas Glenfiddich
## 1 1 1 1
## GlenGarioch Glengoyne GlenGrant GlenKeith
## 1 1 1 1
## Glenkinchie Glenlivet Glenlossie Glenmorangie
## 1 1 1 1
## GlenMoray GlenOrd Glenrothes GlenScotia
## 1 1 1 1
## GlenSpey Glenturret Highland Park Inchgower
## 1 1 1 1
## Isle of Jura Knochando Lagavulin Linkwood
## 1 1 1 1
## Loch Lomond Longmorn Macallan Mannochmore
## 1 1 1 1
## Miltonduff Mortlach Oban OldFettercairn
## 1 1 1 1
## OldPulteney RoyalBrackla RoyalLochnagar Scapa
## 1 1 1 1
## Speyburn Speyside Springbank Strathisla
## 1 1 1 1
## Strathmill Talisker Tamdhu Tamnavulin
## 1 1 1 1
## Teaninich Tobermory Tomatin Tomintoul
## 1 1 1 1
## Tormore Tullibardine
## 1 1
Data perlu di-scale untuk dapat dilakukan clustering
## Body Sweetness Smoky Medicinal Tobacco Honey
## Aberfeldy -0.07498567 -0.4052738 0.5385702 -0.5520139 -0.360623 0.8858842
## Aberlour 0.99980888 0.9888682 -0.6193557 -0.5520139 -0.360623 3.2300701
## AnCnoc -1.14978021 0.9888682 0.5385702 -0.5520139 -0.360623 0.8858842
## Ardbeg 2.07460342 -1.7994159 2.8544220 3.4882579 -0.360623 -1.4583017
## Ardmore -0.07498567 -0.4052738 0.5385702 -0.5520139 -0.360623 -0.2862087
## ArranIsleOf -0.07498567 0.9888682 -0.6193557 0.4580541 -0.360623 -0.2862087
## Spicy Winey Nutty Malty Fruity Floral
## Aberfeldy -0.4890122 1.09701951 0.6509243 0.3142208 0.2536114 0.3535903
## Aberlour 2.0597785 1.09701951 0.6509243 1.9038084 1.5365867 0.3535903
## AnCnoc -1.7634075 -1.04715499 0.6509243 0.3142208 1.5365867 0.3535903
## Ardbeg 0.7853832 -1.04715499 -0.5660211 0.3142208 -1.0293639 -1.9855456
## Ardmore -0.4890122 0.02493226 0.6509243 1.9038084 -1.0293639 -0.8159776
## ArranIsleOf -0.4890122 0.02493226 -1.7829666 -1.2753668 -1.0293639 0.3535903
## K-means clustering with 5 clusters of sizes 18, 6, 6, 26, 30
##
## Cluster means:
## Body Sweetness Smoky Medicinal Tobacco Honey
## 1 -0.3138289 0.44670184 0.08826567 0.1774796 -0.360623 -0.02574364
## 2 -0.2541181 0.05944016 -0.04039276 0.1213648 2.740735 -0.28620875
## 3 1.7163386 -1.10234486 2.46844667 2.8148793 1.706949 -1.26295288
## 4 0.7104411 0.13093463 -0.12946399 -0.4743163 -0.360623 0.79572322
## 5 -0.7198624 -0.17291684 -0.42636806 -0.2826624 -0.360623 -0.36434828
## Spicy Winey Nutty Malty Fruity Floral
## 1 -0.1350135 -0.2728698 -0.09276458 -0.3039522 -1.0293639 -0.55607366
## 2 0.3605847 0.2036135 -0.36319690 0.5791521 -0.3878763 0.15866232
## 3 0.3605847 -0.5111114 -0.36319690 -0.7455043 -0.8155347 -1.79061762
## 4 0.3442463 0.9320830 0.55731312 0.4364968 0.4509922 0.08369002
## 5 -0.3615726 -0.5825838 -0.28206720 -0.1626555 0.4674406 0.58750391
##
## Clustering vector:
## Aberfeldy Aberlour AnCnoc Ardbeg
## 4 4 5 3
## Ardmore ArranIsleOf Auchentoshan Auchroisk
## 1 1 5 4
## Aultmore Balblair Balmenach Belvenie
## 5 1 4 4
## BenNevis Benriach Benrinnes Benromach
## 4 5 4 4
## Bladnoch BlairAthol Bowmore Bruichladdich
## 5 4 1 5
## Bunnahabhain Caol Ila Cardhu Clynelish
## 5 3 5 3
## Craigallechie Craigganmore Dailuaine Dalmore
## 2 5 4 4
## Dalwhinnie Deanston Dufftown Edradour
## 5 4 5 4
## GlenDeveronMacduff GlenElgin GlenGarioch GlenGrant
## 2 5 5 5
## GlenKeith GlenMoray GlenOrd GlenScotia
## 1 5 4 1
## GlenSpey Glenallachie Glendronach Glendullan
## 1 5 4 4
## Glenfarclas Glenfiddich Glengoyne Glenkinchie
## 4 5 5 5
## Glenlivet Glenlossie Glenmorangie Glenrothes
## 4 5 5 1
## Glenturret Highland Park Inchgower Isle of Jura
## 4 1 1 1
## Knochando Lagavulin Corona Linkwood
## 4 3 3 5
## Loch Lomond Longmorn Macallan Mannochmore
## 5 4 4 5
## Miltonduff Mortlach Oban OldFettercairn
## 1 4 1 2
## OldPulteney RoyalBrackla RoyalLochnagar Scapa
## 2 2 4 4
## Speyburn Speyside Springbank Strathisla
## 1 5 1 4
## Strathmill Talisker Tamdhu Tamnavulin
## 5 3 5 5
## Teaninich Tobermory Tomatin Tomintoul
## 5 5 1 1
## Tormore Tullibardine
## 1 2
##
## Within cluster sum of squares by cluster:
## [1] 137.15356 51.81745 46.70501 182.98294 197.77712
## (between_SS / total_SS = 39.6 %)
##
## Available components:
##
## [1] "cluster" "centers" "totss" "withinss" "tot.withinss"
## [6] "betweenss" "size" "iter" "ifault"
RNGkind(sample.kind = "Rounding") # untuk menyamakan hasil set.seed
set.seed(432020)
whi_km <- kmeans(whis_scale, centers = 5)
whi_km## K-means clustering with 5 clusters of sizes 9, 16, 13, 26, 22
##
## Cluster means:
## Body Sweetness Smoky Medicinal Tobacco Honey
## 1 1.1192305 -1.1797972 1.82515451 2.3659602 1.36235362 -1.1978366
## 2 -0.6123829 0.4660649 -0.40224460 -0.2363676 0.22088160 -0.4327204
## 3 0.9998089 0.3454180 -0.08492837 -0.4743163 -0.36062302 0.7055622
## 4 -0.6123829 0.1845555 -0.57482010 -0.3189213 -0.36062302 -0.2862087
## 5 0.1204315 -0.2785337 0.27540521 -0.1388043 -0.07868139 0.7260534
## Spicy Winey Nutty Malty Fruity Floral
## 1 0.2189852 -0.5706718 -0.0251565 -0.5688834 -0.6017055 -1.4657376
## 2 0.2278352 -0.3100950 -1.4026711 -0.0831761 -0.1473184 0.2804923
## 3 0.3932615 1.6742973 0.5573131 0.3142208 0.7470634 -0.4561106
## 4 -0.5870426 -0.5523455 0.4168963 -0.3582970 0.2536114 0.3985737
## 5 0.2061126 0.1223947 0.2083987 0.5309828 -0.3878763 0.1941038
##
## Clustering vector:
## Aberfeldy Aberlour AnCnoc Ardbeg
## 5 3 4 1
## Ardmore ArranIsleOf Auchentoshan Auchroisk
## 5 2 4 3
## Aultmore Balblair Balmenach Belvenie
## 4 4 3 5
## BenNevis Benriach Benrinnes Benromach
## 5 2 5 5
## Bladnoch BlairAthol Bowmore Bruichladdich
## 2 5 5 5
## Bunnahabhain Caol Ila Cardhu Clynelish
## 4 1 4 1
## Craigallechie Craigganmore Dailuaine Dalmore
## 5 4 3 3
## Dalwhinnie Deanston Dufftown Edradour
## 5 5 4 4
## GlenDeveronMacduff GlenElgin GlenGarioch GlenGrant
## 2 4 2 4
## GlenKeith GlenMoray GlenOrd GlenScotia
## 4 4 5 5
## GlenSpey Glenallachie Glendronach Glendullan
## 2 4 3 3
## Glenfarclas Glenfiddich Glengoyne Glenkinchie
## 3 2 4 2
## Glenlivet Glenlossie Glenmorangie Glenrothes
## 5 2 4 3
## Glenturret Highland Park Inchgower Isle of Jura
## 5 5 2 1
## Knochando Lagavulin Corona Linkwood
## 4 1 1 2
## Loch Lomond Longmorn Macallan Mannochmore
## 4 5 3 4
## Miltonduff Mortlach Oban OldFettercairn
## 4 3 1 5
## OldPulteney RoyalBrackla RoyalLochnagar Scapa
## 1 2 3 5
## Speyburn Speyside Springbank Strathisla
## 2 4 5 3
## Strathmill Talisker Tamdhu Tamnavulin
## 4 1 4 4
## Teaninich Tobermory Tomatin Tomintoul
## 2 4 5 2
## Tormore Tullibardine
## 4 2
##
## Within cluster sum of squares by cluster:
## [1] 88.27732 136.27312 99.67552 166.47357 148.53756
## (between_SS / total_SS = 37.3 %)
##
## Available components:
##
## [1] "cluster" "centers" "totss" "withinss" "tot.withinss"
## [6] "betweenss" "size" "iter" "ifault"
Note: - Cluster means: rata-rata dari tiap variabel ke setiap klaster. - Cluster Vector: data yang kita miliki masuk ke cluster berapa.
Ada beberapa nilai yang dapat dihitung untuk mengukur seberapa baik cluster kita
WSS(Within Sum of Squared) adalah nilai dari SSE tiap cluster ke centroidnya [jarak data ke centroid cluster]. Total WSS adalah jumlah nilai dari WSS dari tiap cluster. Yang kita inginkan adalah nilai Total WSS sekecil mungkin.
## [1] 88.27732 136.27312 99.67552 166.47357 148.53756
## [1] 639.2371
Apa yang terjadi pada Total WSS ketika kita meningkatkan nilai K? WSS akan semakin kecil, kalau k = jumlah observasi, WSS = 0
BSS(Between Sum of Squared) adalah nilai dari SSE tiap centroid cluster ke centroid global. Ini jelas bahwa kita menginginkan BSS yang besar.
## [1] 380.7629
Ada pula istilah lain yang disebut dengan Total Sum of Squared yang mengukur SSE pada tiap data ke centroid global.
## [1] 1020
Nilai dari BSS akan semakin besar
Jadi, dapatkah kita menaikkan jumlah K untuk mendapatkan cluster yang lebih baik untuk data kita (Karena Total WSS akan cenderung mendekati 0 dan proporsi BSS akan mendekati 100%)? Kenapa? Adakah solusi untuk permasalahan ini? Kita harus menaikkan jumlah K, tapi tidak informatif
Berikut merupakan fungsi yang dapat kamu gunakan untuk memvisualisasi total wss
wss <- function(data, maxCluster = 9) {
# Initialize within sum of squares
SSw <- (nrow(data) - 1) * sum(apply(data, 2, var))
SSw <- vector()
set.seed(100)
for (i in 2:maxCluster) {
SSw[i] <- sum(kmeans(data, centers = i)$withinss)
}
plot(1:maxCluster, SSw, type = "o", xlab = "Number of Clusters", ylab = "Within groups sum of squares", pch=19)
}Mencoba menggunakan fungsi wss dan memantau hasilnay.
Note:
akan dipilih cluster = 5, karena WSS setelah klaster 5 cenderung landai
K-Means clustering sangat simple. Hal ini dikarenakan kondisi awal yang kita gunakan adalah random. Perhatikan animasi di bawah ini. Dibawah ini adalah gambaran visual mengenai K-mean Clustering.
set.seed(13)
library(animation)
## set larger 'interval' if the speed is too fast
ani.options(interval = 1)
par(mar = c(3, 3, 1, 1.5), mgp = c(1.5, 0.5, 0))
kmeans.ani()K-means steps: 1. membuat K titik random 2. buat k kelompok beranggotakan titik-titik terdekat terhadap masing-masing k titik random tersebut 3. hitung centroid masing-masing kelompok 4. geser titik random awal ke centroid tersebut 5. buat k kelompok beranggotakan titik-titik terdekat terhadap masing-masing k titik centroid baru 6. hitung centroid baru masing-masing kelompok 7. geser titik centroid awal ke centroid baru tersebut 8. Ulangi langkah 5-7 hingga tidak ada perubahan kelompok 9. Selesai.
Mr. Covid adalah seorang pelanggan whiski Corona di Italia. Sedangkan produksi whiski Corona sudah di stop dan bahkan keberadannya di toko sudah ditarik oleh produsen, berkaitan dengan situasi dan kondisi pandemi virus Corona di Italia. Karena Mr. Covid sangat suka dengan “Corona” Whisky, maka dicari alternatifnya. Kami sebagai supplier whiski Corona untuk Mr. Covid berusaha mencari alternatifnya, dan merekomendasikan whisky yang kemungkinan bisa disukai Mr.Covid, dengan menyarankan atau menawarkan produk serupa dalam hal komposisi kandungan alkoholnya.
# Give your recommendation here
whiskies$cluster <- whi_km$cluster
# base R
whiskies[rownames(whiskies) == "Corona", ]## Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty Malty
## Corona 4 2 4 4 1 0 0 1 1 1
## Fruity Floral cluster
## Corona 0 0 1
## Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty Malty Fruity
## 1 4 2 4 4 1 0 0 1 1 1 0
## Floral cluster
## 1 0 1
## Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty
## Ardbeg 4 1 4 4 0 0 2 0 1
## Caol Ila 3 1 4 2 1 0 2 0 2
## Clynelish 3 2 3 3 1 0 2 0 1
## Isle of Jura 2 1 2 2 0 1 1 0 2
## Lagavulin 4 1 4 4 1 0 1 2 1
## Corona 4 2 4 4 1 0 0 1 1
## Oban 2 2 2 2 0 0 2 0 2
## OldPulteney 2 1 2 2 1 0 1 1 2
## Talisker 4 2 3 3 0 1 3 0 1
## Malty Fruity Floral cluster
## Ardbeg 2 1 0 1
## Caol Ila 1 1 1 1
## Clynelish 1 2 0 1
## Isle of Jura 1 1 1 1
## Lagavulin 1 1 0 1
## Corona 1 0 0 1
## Oban 2 2 0 1
## OldPulteney 2 2 2 1
## Talisker 2 2 0 1
## # A tibble: 5 x 13
## cluster Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty Malty
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 3.11 1.44 3.11 2.89 0.556 0.222 1.56 0.444 1.44 1.44
## 2 2 1.5 2.62 1.19 0.312 0.188 0.875 1.56 0.688 0.312 1.75
## 3 3 3 2.54 1.46 0.0769 0 1.85 1.69 2.54 1.92 2
## 4 4 1.5 2.42 1.04 0.231 0 1 0.923 0.462 1.81 1.58
## 5 5 2.18 2.09 1.77 0.409 0.0909 1.86 1.55 1.09 1.64 2.14
## # ... with 2 more variables: Fruity <dbl>, Floral <dbl>
Apa karakteristik dari whiski Corona ? Observasilah menggunakan plot di bawah ini
Karakteristik dari Corona
whiskies %>%
# filter(cluster == 1) %>%
group_by(cluster) %>%
summarise_all("mean") %>%
select(Tobacco, Medicinal, Smoky, Body)## # A tibble: 5 x 4
## Tobacco Medicinal Smoky Body
## <dbl> <dbl> <dbl> <dbl>
## 1 0.556 2.89 3.11 3.11
## 2 0.188 0.312 1.19 1.5
## 3 0 0.0769 1.46 3
## 4 0 0.231 1.04 1.5
## 5 0.0909 0.409 1.77 2.18
Nilai Smoky, Medicinal, Tobacco, dan Body tinggi untuk klaster 1 (klaster Corona berada), sehingga alternatif untuk menggantikan jenis whiski Corona ada di cluster 1, seperti whiski Ardbeg dan Lagavulin.
# Give your recommendation here
whiskies$cluster <- whi_km$cluster
# base R
whiskies[rownames(whiskies) == "Corona", ]## Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty Malty
## Corona 4 2 4 4 1 0 0 1 1 1
## Fruity Floral cluster
## Corona 0 0 1
# Give your recommendation here
whiskies$cluster <- whi_km$cluster
# base R
whiskies[rownames(whiskies) == "Ardbeg", ]## Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty Malty
## Ardbeg 4 1 4 4 0 0 2 0 1 2
## Fruity Floral cluster
## Ardbeg 1 0 1
# Give your recommendation here
whiskies$cluster <- whi_km$cluster
# base R
whiskies[rownames(whiskies) == "Lagavulin", ]## Body Sweetness Smoky Medicinal Tobacco Honey Spicy Winey Nutty Malty
## Lagavulin 4 1 4 4 1 0 1 2 1 1
## Fruity Floral cluster
## Lagavulin 1 0 1
## Body Sweetness Smoky Medicinal
## Min. :0.00 Min. :1.000 Min. :0.000 Min. :0.0000
## 1st Qu.:2.00 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:0.0000
## Median :2.00 Median :2.000 Median :1.000 Median :0.0000
## Mean :2.07 Mean :2.291 Mean :1.535 Mean :0.5465
## 3rd Qu.:2.00 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:1.0000
## Max. :4.00 Max. :4.000 Max. :4.000 Max. :4.0000
## Tobacco Honey Spicy Winey
## Min. :0.0000 Min. :0.000 Min. :0.000 Min. :0.0000
## 1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:0.0000
## Median :0.0000 Median :1.000 Median :1.000 Median :1.0000
## Mean :0.1163 Mean :1.244 Mean :1.384 Mean :0.9767
## 3rd Qu.:0.0000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:1.0000
## Max. :1.0000 Max. :4.000 Max. :3.000 Max. :4.0000
## Nutty Malty Fruity Floral
## Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000
## 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000
## Median :2.000 Median :2.000 Median :2.000 Median :2.000
## Mean :1.465 Mean :1.802 Mean :1.802 Mean :1.698
## 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000
## Max. :4.000 Max. :3.000 Max. :3.000 Max. :4.000
## cluster
## Min. :1.000
## 1st Qu.:2.000
## Median :4.000
## Mean :3.419
## 3rd Qu.:4.750
## Max. :5.000
Keuntungan K-Means:
Mudah dimengerti, mudah diimplementasikan, dan bisa diprofilisasi.
Kekurangan K-Means:
harus menentukan jumlah k, sensitive saat inisialisasi (karena lokasi centroid random), sensitive terhadap outlier, namun bisa diatasi dgn hapus outlier/tentukan ulang jumlah k.