{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"mount_file_id":"1VMzZfPLrMS1V1MdmsehLQuNW9180mfV4","authorship_tag":"ABX9TyNdW0MsgJbUzb8kDdoWgAc3"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# **Studi Kasus Heart Disease 5**"],"metadata":{"id":"8Qs3oZydyjqD"}},{"cell_type":"markdown","source":["Implementasi dengan menggunakan `Naive Bayes` , `K-NN` , `K-Means Clustering` dan `Decision Tree` Dengan data tanpa `Normalisasi`."],"metadata":{"id":"mLQZr7xnysS1"}},{"cell_type":"markdown","source":["## Membaca Data"],"metadata":{"id":"6mTXE7mMzBGH"}},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":424},"id":"BP0PtnqNgwOH","executionInfo":{"status":"ok","timestamp":1669558740737,"user_tz":-420,"elapsed":332,"user":{"displayName":"Caca Erha","userId":"13359221303846732984"}},"outputId":"fb9e5393-3dc4-4215-c53f-b37e76357e39"},"outputs":[{"output_type":"execute_result","data":{"text/plain":[" age sex BP cholestrol heart disease\n","0 70 1 130 322 1\n","1 67 0 115 564 0\n","2 57 1 124 261 1\n","3 64 1 128 263 0\n","4 74 0 120 269 0\n",".. ... ... ... ... ...\n","265 52 1 172 199 0\n","266 44 1 120 263 0\n","267 56 0 140 294 0\n","268 57 1 140 192 0\n","269 67 1 160 286 1\n","\n","[270 rows x 5 columns]"],"text/html":["\n","
\n"," | age | \n","sex | \n","BP | \n","cholestrol | \n","heart disease | \n","
---|---|---|---|---|---|
0 | \n","70 | \n","1 | \n","130 | \n","322 | \n","1 | \n","
1 | \n","67 | \n","0 | \n","115 | \n","564 | \n","0 | \n","
2 | \n","57 | \n","1 | \n","124 | \n","261 | \n","1 | \n","
3 | \n","64 | \n","1 | \n","128 | \n","263 | \n","0 | \n","
4 | \n","74 | \n","0 | \n","120 | \n","269 | \n","0 | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
265 | \n","52 | \n","1 | \n","172 | \n","199 | \n","0 | \n","
266 | \n","44 | \n","1 | \n","120 | \n","263 | \n","0 | \n","
267 | \n","56 | \n","0 | \n","140 | \n","294 | \n","0 | \n","
268 | \n","57 | \n","1 | \n","140 | \n","192 | \n","0 | \n","
269 | \n","67 | \n","1 | \n","160 | \n","286 | \n","1 | \n","
270 rows × 5 columns
\n","\n"," | age | \n","sex | \n","BP | \n","cholestrol | \n","
---|---|---|---|---|
0 | \n","70 | \n","1 | \n","130 | \n","322 | \n","
1 | \n","67 | \n","0 | \n","115 | \n","564 | \n","
2 | \n","57 | \n","1 | \n","124 | \n","261 | \n","
3 | \n","64 | \n","1 | \n","128 | \n","263 | \n","
4 | \n","74 | \n","0 | \n","120 | \n","269 | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","
265 | \n","52 | \n","1 | \n","172 | \n","199 | \n","
266 | \n","44 | \n","1 | \n","120 | \n","263 | \n","
267 | \n","56 | \n","0 | \n","140 | \n","294 | \n","
268 | \n","57 | \n","1 | \n","140 | \n","192 | \n","
269 | \n","67 | \n","1 | \n","160 | \n","286 | \n","
270 rows × 4 columns
\n","\n"," | age | \n","sex | \n","BP | \n","cholestrol | \n","
---|---|---|---|---|
0 | \n","0.50 | \n","1.0 | \n","1.000000 | \n","0.12 | \n","
1 | \n","0.00 | \n","0.0 | \n","0.012987 | \n","0.00 | \n","
2 | \n","1.00 | \n","1.0 | \n","0.038961 | \n","0.12 | \n","
3 | \n","0.85 | \n","0.0 | \n","0.000000 | \n","1.00 | \n","