{"id":3068,"date":"2017-01-12T02:43:28","date_gmt":"2017-01-12T02:43:28","guid":{"rendered":"http:\/\/www.rezafaisal.net\/?p=3068"},"modified":"2017-01-22T07:02:30","modified_gmt":"2017-01-22T07:02:30","slug":"menghitung-kinerja-algoritma-klasifikasi-pilih-roc-curve-atau-precision-recall-curve","status":"publish","type":"post","link":"https:\/\/www.rezafaisal.net\/?p=3068","title":{"rendered":"Menghitung kinerja algoritma klasifikasi: Pilih ROC Curve atau Precision-Recall Curve?"},"content":{"rendered":"<p>Pada posting sebelumnya sudah dibahas tentang menghitung kinerja algoritma klasifikasi dengan <strong><u>Confusion Matrix<\/u><\/strong>.<\/p>\n<p><a href=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/01.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"01\" src=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/01_thumb.jpg\" alt=\"01\" width=\"550\" height=\"257\" border=\"0\" \/><\/a><\/p>\n<p>Tetapi confusion matrix hanya menyajikan informasi dalam bentuk angka.\u00a0 Untuk kasus <strong><u>klasifikasi 2 class (binary classification)<\/u><\/strong>, jika ingin menampilkan informasi kinerja algoritma klasifikasi dalam bentuk grafik maka dapat digunakan <strong><u>Receiver Operating Characteristic (ROC)<\/u><\/strong> atau <strong><u>Precision-Recall Curve<\/u><\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<p>{<strong><em>Receiver Operating Characteristic \/ ROC<\/em><\/strong>}<\/p>\n<p>Kurva ROC dibuat berdasarkan nilai telah didapatkan pada perhitungan dengan confusion matrix, yaitu antara <strong><u>False Positive Rate<\/u><\/strong> dengan <strong><u>True Positive Rate<\/u><\/strong>. Dimana:<\/p>\n<ul>\n<li>False Positive Rate (FPR) = False Positive \/ (False Positive + True Negative)<\/li>\n<li>True Positive Rate (TPR) = True Positive \/ (True Positive + False Negative)<\/li>\n<\/ul>\n<p>Dan berikut adalah contoh kurva ROC.<\/p>\n<p><a href=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/02.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"02\" src=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/02_thumb.jpg\" alt=\"02\" width=\"400\" height=\"380\" border=\"0\" \/><\/a><\/p>\n<p>Untuk membaca kurva ini sangat mudah, kinerja algoritma klasifikasi adalah:<\/p>\n<ul>\n<li>JELEK, jika kurva yang dihasilkan mendekati garis baseline atau garis yang melintang dari titik 0,0.<\/li>\n<li>BAGUS, jika kurva mendekati titik 0,1.<\/li>\n<\/ul>\n<p>Pada contoh di atas dapat dilihat 2 kurva, yaitu kurva dengan warna biru dan kurva dengan warna hijau.\u00a0 Berdasarkan cara membaca di atas, maka dapat disimpulkan kinerja kurva berwarna biru lebih bagus dibandingkan kinerja kurva berwarna hijau.\u00a0 Nah dengan cara seperti ini maka kita dengan mudah membandingkan bagus atau tidaknya teknik-teknik yang digunakan untuk menyelesaikan kasus klasifikasi pada suatu percobaan.<\/p>\n<p>Selain itu jika ingin membandingkan nilai kinerja kurva biru dan kurva hijau dalam bentuk angka maka dapat dilakukan dengan membandingkan luas di bawah kurva atau Area Under Curve (AUC), dari gambar dapat dapat disimpulkan luas area kurva berwarna biru lebih besar dibanding luas area kurva berwar hijau.<\/p>\n<p>Berikut ini adalah implementasi ROC dan AUC pada R. Package yang digunakan adalah ROCR.\u00a0 Untuk menginstall package ini digunakan perintah berikut ini.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> install.packages(<span style=\"color: #006080;\">\"ROCR\"<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Pertama adalah menyiapkan data iris (yang memiliki 3 class) agar menjadi 2 class saja yaitu setosa dan virginica.\u00a0 Dan disiapkan juga data untuk training dan testing.\u00a0 Berikut adalah kode yang digunakan untuk keperluan tersebut.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> data2class.train = rbind((iris[which(iris$Species == <span style=\"color: #006080;\">\"setosa\"<\/span>),])[1:45,], (iris[which(iris$Species == <span style=\"color: #006080;\">\"virginica\"<\/span>),])[1:45,])<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum2\" style=\"color: #606060;\">   2:<\/span> data2class.test = rbind((iris[which(iris$Species == <span style=\"color: #006080;\">\"setosa\"<\/span>),])[46:50,], (iris[which(iris$Species == <span style=\"color: #006080;\">\"virginica\"<\/span>),])[46:50,])<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum3\" style=\"color: #606060;\">   3:<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum4\" style=\"color: #606060;\">   4:<\/span> data2class.train = droplevels(data2class.train)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum5\" style=\"color: #606060;\">   5:<\/span> data2class.test = droplevels(data2class.test)<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Selanjutnya adalah melakukan klasifikasi, pada contoh ini digunakan algoritma SVM dengan menggunakan fungsi ksvm() dari package kernlab.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> library(kernlab)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum2\" style=\"color: #606060;\">   2:<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum3\" style=\"color: #606060;\">   3:<\/span> model = ksvm(Species~., data2class.train)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum4\" style=\"color: #606060;\">   4:<\/span> predict_result = predict(model, data2class.test[,-5])<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Kemudian untuk menghitung kinerja digunakan fungsi-fungsi dari package ROC berikut ini.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> library(ROCR)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum2\" style=\"color: #606060;\">   2:<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum3\" style=\"color: #606060;\">   3:<\/span> roc.prediction = prediction(as.numeric(as.factor(predict_result)), as.numeric(as.factor(data2class.test[,5])))<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum4\" style=\"color: #606060;\">   4:<\/span> roc.tpr.fpr = performance(roc.prediction,<span style=\"color: #006080;\">\"tpr\"<\/span>,<span style=\"color: #006080;\">\"fpr\"<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum5\" style=\"color: #606060;\">   5:<\/span> roc.auc = performance(roc.prediction,<span style=\"color: #006080;\">\"auc\"<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Untuk menggambar kurva ROC berdasarkan hasil perhitungan di atas digunakan kode dibawah ini.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> plot(roc.tpr.fpr, col=<span style=\"color: #006080;\">\"red\"<\/span>,lty=3)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum2\" style=\"color: #606060;\">   2:<\/span> abline(a=0, b= 1)<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Berikut adalah kurva ROC yang dihasilkan.<\/p>\n<p><a href=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/03.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"03\" src=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/03_thumb.jpg\" alt=\"03\" width=\"550\" height=\"305\" border=\"0\" \/><\/a><\/p>\n<p>Dan untuk menampilkan hasil perhitungan AUC digunakan kode berikut ini.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> print(paste(<span style=\"color: #006080;\">\"Luas AUC:\"<\/span>, roc.auc@y.values))<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Dan nilai yang didapatkan adalah:<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> <span style=\"color: #006080;\">\"Luas AUC: 1\"<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Dari kurva ROC dan nilai AUC di atas dapat disimpulan bahwa kinerja algoritma SVM untuk kasus dataset Iris dapat memprediksi seluruh data test dengan sempurna.<\/p>\n<p>&nbsp;<\/p>\n<p>{<strong><em>Precision-Recall Curve<\/em><\/strong>}<\/p>\n<p>Menurut beberapa literatur, jika kita menemui kasus dimana class positive (yang biasanya berjumlah sedikit, atau minority class) maka yang cocok digunakan sebagai teknik untuk menggambar kurva kinerja adalah Precision-Recall Curve.\u00a0 Kurva ini dibuat berdasarkan nilai telah didapatkan pada perhitungan dengan confusion matrix, yaitu antara <strong><u>Precision<\/u><\/strong> dan <strong><u>Recall<\/u><\/strong>, dimana:<\/p>\n<ul>\n<li>precision = True Positive \/ (True Positive + False Positive)<\/li>\n<li>recall = True Positive \/ (True Positive + False Negative)<\/li>\n<\/ul>\n<p>Dan berikut adalah contoh kurva Precision-Recall.<\/p>\n<p><a href=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/04.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"04\" src=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/04_thumb.jpg\" alt=\"04\" width=\"400\" height=\"385\" border=\"0\" \/><\/a><\/p>\n<p>Kode R yang digunakan untuk menghitung precision dan recall kemudian menggambarkannya dalam kurva adalah sebagai berikut.<\/p>\n<div id=\"codeSnippetWrapper\" style=\"font-size: 8pt; overflow: auto; cursor: text; font-family: 'Courier New', courier, monospace; width: 97.5%; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\">\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum1\" style=\"color: #606060;\">   1:<\/span> library(ROCR)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum2\" style=\"color: #606060;\">   2:<\/span> roc.prediction = prediction(as.numeric(as.factor(predict_result)), as.numeric(as.factor(data2class.test[,5])))<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum3\" style=\"color: #606060;\">   3:<\/span> roc.prec.rec = performance(roc.prediction,<span style=\"color: #006080;\">\"prec\"<\/span>,<span style=\"color: #006080;\">\"rec\"<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: #f4f4f4; border-style: none; padding: 0px;\"><span id=\"lnum4\" style=\"color: #606060;\">   4:<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"font-size: 8pt; overflow: visible; font-family: 'Courier New', courier, monospace; width: 100%; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; background-color: white; border-style: none; padding: 0px;\"><span id=\"lnum5\" style=\"color: #606060;\">   5:<\/span> plot(roc.prec.rec, col=<span style=\"color: #006080;\">\"red\"<\/span>,lty=3)<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>Dan hasilnya adalah sebagai berikut.<\/p>\n<p><a href=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/05.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"05\" src=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/05_thumb.jpg\" alt=\"05\" width=\"550\" height=\"305\" border=\"0\" \/><\/a><\/p>\n<p>Nah gampang kan. Selamat mencoba <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-style: none;\" src=\"http:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/wlEmoticon-smile.png\" alt=\"Smile\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pada posting sebelumnya sudah dibahas tentang menghitung kinerja algoritma klasifikasi dengan Confusion Matrix. Tetapi confusion matrix hanya menyajikan informasi dalam bentuk angka.\u00a0 Untuk kasus klasifikasi 2 class (binary classification), jika ingin menampilkan informasi kinerja algoritma klasifikasi dalam bentuk grafik maka&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3058,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[150],"class_list":["post-3068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-softwaredev","tag-r"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.rezafaisal.net\/wp-content\/uploads\/2017\/01\/01_thumb.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1sNAL-Nu","_links":{"self":[{"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/posts\/3068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3068"}],"version-history":[{"count":2,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/posts\/3068\/revisions"}],"predecessor-version":[{"id":3079,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/posts\/3068\/revisions\/3079"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=\/wp\/v2\/media\/3058"}],"wp:attachment":[{"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rezafaisal.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}