{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"collapsed_sections":["51Rqt_IBsSSk","2wwVqbUcs-R5","FNcS2pkK8XYu"],"authorship_tag":"ABX9TyNc3Rq8UXGeqNPKG/G+ChOn"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# **Tugas 2 | Diskritisasi data**"],"metadata":{"id":"lr9BFevqpF0I"}},{"cell_type":"markdown","source":["Diskretisasi adalah proses mengganti kontinum dengan set poin yang terbatas. Dalam konteks komputasi digital, diskritisasi terjadi ketika sinyal waktu kontinu, seperti audio atau video, direduksi menjadi sinyal diskrit. Proses diskritisasi merupakan bagian integral dari konversi analog ke digital. Diskretisasi terkait dengan istilah kuantisasi.\n","\n","- Carilah data yang bertipe numerik ( data klassifikasi)\n","\n","- Lakukan proses diskritisasi dengan equal width dan equal frequency\n","\n","- Lakukan proses diskritisasi dengan basis entropy\n","\n","- Kumpulkan tugas dengan link github ( web statis dari jupyter book)"],"metadata":{"id":"-anjEgSW6-WD"}},{"cell_type":"code","execution_count":1,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":424},"id":"VWbmzb9PnHY4","executionInfo":{"status":"ok","timestamp":1670808125869,"user_tz":-420,"elapsed":1258,"user":{"displayName":"Caca Erha","userId":"13359221303846732984"}},"outputId":"c4496cc7-599c-4f29-f2d2-6882eba5d16a"},"outputs":[{"output_type":"execute_result","data":{"text/plain":[" sepal.length sepal.width petal.length petal.width variety\n","0 5.1 3.5 1.4 0.2 Setosa\n","1 4.9 3.0 1.4 0.2 Setosa\n","2 4.7 3.2 1.3 0.2 Setosa\n","3 4.6 3.1 1.5 0.2 Setosa\n","4 5.0 3.6 1.4 0.2 Setosa\n",".. ... ... ... ... ...\n","145 6.7 3.0 5.2 2.3 Virginica\n","146 6.3 2.5 5.0 1.9 Virginica\n","147 6.5 3.0 5.2 2.0 Virginica\n","148 6.2 3.4 5.4 2.3 Virginica\n","149 5.9 3.0 5.1 1.8 Virginica\n","\n","[150 rows x 5 columns]"],"text/html":["\n","
\n"," | sepal.length | \n","sepal.width | \n","petal.length | \n","petal.width | \n","variety | \n","
---|---|---|---|---|---|
0 | \n","5.1 | \n","3.5 | \n","1.4 | \n","0.2 | \n","Setosa | \n","
1 | \n","4.9 | \n","3.0 | \n","1.4 | \n","0.2 | \n","Setosa | \n","
2 | \n","4.7 | \n","3.2 | \n","1.3 | \n","0.2 | \n","Setosa | \n","
3 | \n","4.6 | \n","3.1 | \n","1.5 | \n","0.2 | \n","Setosa | \n","
4 | \n","5.0 | \n","3.6 | \n","1.4 | \n","0.2 | \n","Setosa | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
145 | \n","6.7 | \n","3.0 | \n","5.2 | \n","2.3 | \n","Virginica | \n","
146 | \n","6.3 | \n","2.5 | \n","5.0 | \n","1.9 | \n","Virginica | \n","
147 | \n","6.5 | \n","3.0 | \n","5.2 | \n","2.0 | \n","Virginica | \n","
148 | \n","6.2 | \n","3.4 | \n","5.4 | \n","2.3 | \n","Virginica | \n","
149 | \n","5.9 | \n","3.0 | \n","5.1 | \n","1.8 | \n","Virginica | \n","
150 rows Γ 5 columns
\n","\n"," | category_sepal_length | \n","category_sepal_width | \n","category_petal_length | \n","category_petal_width | \n","variety | \n","
---|---|---|---|---|---|
0 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
1 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
2 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
3 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
4 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
145 | \n","B | \n","B | \n","C | \n","C | \n","Virginica | \n","
146 | \n","B | \n","A | \n","C | \n","C | \n","Virginica | \n","
147 | \n","B | \n","B | \n","C | \n","C | \n","Virginica | \n","
148 | \n","B | \n","B | \n","C | \n","C | \n","Virginica | \n","
149 | \n","B | \n","B | \n","C | \n","C | \n","Virginica | \n","
150 rows Γ 5 columns
\n","\n"," | category_sepal_length | \n","category_sepal_width | \n","category_petal_length | \n","category_petal_width | \n","variety | \n","
---|---|---|---|---|---|
0 | \n","A | \n","C | \n","A | \n","A | \n","Setosa | \n","
1 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
2 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
3 | \n","A | \n","B | \n","A | \n","A | \n","Setosa | \n","
4 | \n","A | \n","C | \n","A | \n","A | \n","Setosa | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
145 | \n","C | \n","B | \n","C | \n","C | \n","Virginica | \n","
146 | \n","B | \n","A | \n","C | \n","C | \n","Virginica | \n","
147 | \n","C | \n","B | \n","C | \n","C | \n","Virginica | \n","
148 | \n","B | \n","C | \n","C | \n","C | \n","Virginica | \n","
149 | \n","B | \n","B | \n","C | \n","C | \n","Virginica | \n","
150 rows Γ 5 columns
\n","\n"," | petal.length | \n","category_petal_length | \n","
---|---|---|
0 | \n","1.4 | \n","A | \n","
1 | \n","1.4 | \n","A | \n","
2 | \n","1.3 | \n","A | \n","
3 | \n","1.5 | \n","A | \n","
4 | \n","1.4 | \n","A | \n","
... | \n","... | \n","... | \n","
145 | \n","5.2 | \n","C | \n","
146 | \n","5.0 | \n","C | \n","
147 | \n","5.2 | \n","C | \n","
148 | \n","5.4 | \n","C | \n","
149 | \n","5.1 | \n","C | \n","
150 rows Γ 2 columns
\n","