diff --git "a/P1G5_Set_1_badriah_nursakinah.ipynb" "b/P1G5_Set_1_badriah_nursakinah.ipynb" --- "a/P1G5_Set_1_badriah_nursakinah.ipynb" +++ "b/P1G5_Set_1_badriah_nursakinah.ipynb" @@ -14,7 +14,7 @@ "\n", "Studi Kasus : Memprediksi `default_payment_next_month` dengan model Classification pada dataset yang sudah di simpan pada format csv\n", "\n", - "Link Hugging : https://huggingface.co/spaces/nursakinahbadriah/Predict_FIFA_Player_Rating (contoh)\n", + "Link Hugging : https://huggingface.co/spaces/nursakinahbadriah/predict_credit_card_default/tree/main\n", "\n", "---\n" ] @@ -93,7 +93,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -147,7 +147,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -520,7 +520,7 @@ "[2965 rows x 24 columns]" ] }, - "execution_count": 74, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -533,7 +533,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -547,7 +547,7 @@ " dtype='object')" ] }, - "execution_count": 75, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -565,7 +565,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -864,7 +864,7 @@ "[8 rows x 24 columns]" ] }, - "execution_count": 76, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -887,7 +887,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -942,7 +942,7 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -1147,7 +1147,7 @@ "[5 rows x 24 columns]" ] }, - "execution_count": 78, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -1159,7 +1159,7 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -1364,7 +1364,7 @@ "[5 rows x 24 columns]" ] }, - "execution_count": 79, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -1383,7 +1383,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -1393,7 +1393,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -1402,7 +1402,7 @@ "1" ] }, - "execution_count": 81, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -1421,7 +1421,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -1430,7 +1430,7 @@ "0" ] }, - "execution_count": 82, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -1450,7 +1450,7 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -1483,7 +1483,7 @@ "dtype: int64" ] }, - "execution_count": 83, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -1502,7 +1502,7 @@ }, { "cell_type": "code", - "execution_count": 84, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -1801,7 +1801,7 @@ "[8 rows x 24 columns]" ] }, - "execution_count": 84, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -1834,7 +1834,7 @@ }, { "cell_type": "code", - "execution_count": 85, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -2207,7 +2207,7 @@ "[2964 rows x 25 columns]" ] }, - "execution_count": 85, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -2239,7 +2239,7 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -2300,7 +2300,7 @@ "Remaja 271" ] }, - "execution_count": 86, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -2322,7 +2322,7 @@ }, { "cell_type": "code", - "execution_count": 87, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -2339,7 +2339,7 @@ }, { "cell_type": "code", - "execution_count": 88, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -2412,7 +2412,7 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -2462,7 +2462,7 @@ }, { "cell_type": "code", - "execution_count": 90, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -2510,7 +2510,7 @@ }, { "cell_type": "code", - "execution_count": 91, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -2558,7 +2558,7 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -2608,7 +2608,7 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -2651,7 +2651,7 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -2660,7 +2660,7 @@ "" ] }, - "execution_count": 94, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" }, @@ -2695,7 +2695,7 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -2724,7 +2724,7 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -2758,7 +2758,7 @@ "dtype: int64" ] }, - "execution_count": 96, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -2779,7 +2779,7 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -2791,7 +2791,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -2815,7 +2815,7 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -2835,7 +2835,7 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -2867,7 +2867,7 @@ "dtype: int64" ] }, - "execution_count": 100, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -2886,7 +2886,7 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -2919,7 +2919,7 @@ }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 30, "metadata": {}, "outputs": [ { @@ -3122,7 +3122,7 @@ "[2370 rows x 9 columns]" ] }, - "execution_count": 102, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -3141,7 +3141,7 @@ }, { "cell_type": "code", - "execution_count": 103, + "execution_count": 31, "metadata": {}, "outputs": [], "source": [ @@ -3168,7 +3168,7 @@ }, { "cell_type": "code", - "execution_count": 104, + "execution_count": 32, "metadata": {}, "outputs": [ { @@ -3204,7 +3204,7 @@ }, { "cell_type": "code", - "execution_count": 105, + "execution_count": 33, "metadata": {}, "outputs": [], "source": [ @@ -3224,7 +3224,7 @@ }, { "cell_type": "code", - "execution_count": 106, + "execution_count": 34, "metadata": {}, "outputs": [], "source": [ @@ -3241,7 +3241,7 @@ }, { "cell_type": "code", - "execution_count": 107, + "execution_count": 35, "metadata": {}, "outputs": [ { @@ -3282,7 +3282,7 @@ "Name: default_payment_next_month, dtype: float64" ] }, - "execution_count": 107, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -3304,7 +3304,7 @@ }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 36, "metadata": {}, "outputs": [ { @@ -3325,7 +3325,7 @@ " 'pay_amt_6']" ] }, - "execution_count": 108, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -3349,7 +3349,7 @@ }, { "cell_type": "code", - "execution_count": 109, + "execution_count": 37, "metadata": {}, "outputs": [], "source": [ @@ -3367,7 +3367,7 @@ }, { "cell_type": "code", - "execution_count": 110, + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ @@ -3378,7 +3378,7 @@ }, { "cell_type": "code", - "execution_count": 111, + "execution_count": 39, "metadata": {}, "outputs": [ { @@ -3629,7 +3629,7 @@ "[2370 rows x 13 columns]" ] }, - "execution_count": 111, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -3657,7 +3657,7 @@ }, { "cell_type": "code", - "execution_count": 112, + "execution_count": 40, "metadata": {}, "outputs": [], "source": [ @@ -3667,13 +3667,13 @@ }, { "cell_type": "code", - "execution_count": 113, + "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
ColumnTransformer(remainder='passthrough',\n",
+       "
ColumnTransformer(remainder='passthrough',\n",
        "                  transformers=[('scaling', StandardScaler(),\n",
        "                                 ['limit_balance', 'pay_amt_1', 'pay_amt_2',\n",
        "                                  'pay_amt_3', 'pay_amt_4', 'pay_amt_5',\n",
-       "                                  'pay_amt_6'])])
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
['limit_balance', 'pay_amt_1', 'pay_amt_2', 'pay_amt_3', 'pay_amt_4', 'pay_amt_5', 'pay_amt_6']
StandardScaler()
passthrough
" ], "text/plain": [ "ColumnTransformer(remainder='passthrough',\n", @@ -4095,7 +4095,7 @@ " 'pay_amt_6'])])" ] }, - "execution_count": 113, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -4108,7 +4108,7 @@ }, { "cell_type": "code", - "execution_count": 114, + "execution_count": 42, "metadata": {}, "outputs": [ { @@ -4385,7 +4385,7 @@ "[2370 rows x 13 columns]" ] }, - "execution_count": 114, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -4420,7 +4420,7 @@ }, { "cell_type": "code", - "execution_count": 115, + "execution_count": 43, "metadata": {}, "outputs": [], "source": [ @@ -4465,7 +4465,7 @@ }, { "cell_type": "code", - "execution_count": 116, + "execution_count": 44, "metadata": {}, "outputs": [], "source": [ @@ -4484,7 +4484,7 @@ }, { "cell_type": "code", - "execution_count": 117, + "execution_count": 45, "metadata": {}, "outputs": [ { @@ -4557,13 +4557,13 @@ }, { "cell_type": "code", - "execution_count": 118, + "execution_count": 46, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Pipeline(steps=[('preprocessing',\n",
+       "
Pipeline(steps=[('preprocessing',\n",
        "                 ColumnTransformer(remainder='passthrough',\n",
        "                                   transformers=[('scaling', StandardScaler(),\n",
        "                                                  ['limit_balance', 'pay_amt_1',\n",
        "                                                   'pay_amt_2', 'pay_amt_3',\n",
        "                                                   'pay_amt_4', 'pay_amt_5',\n",
        "                                                   'pay_amt_6'])])),\n",
-       "                ('SVM', SVC())])
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
['limit_balance', 'pay_amt_1', 'pay_amt_2', 'pay_amt_3', 'pay_amt_4', 'pay_amt_5', 'pay_amt_6']
StandardScaler()
['pay_1', 'pay_2', 'pay_3', 'pay_4', 'pay_5', 'pay_6']
passthrough
" ], "text/plain": [ "Pipeline(steps=[('preprocessing',\n", @@ -4998,7 +4998,7 @@ " ('SVM', SVC())])" ] }, - "execution_count": 118, + "execution_count": 46, "metadata": {}, "output_type": "execute_result" } @@ -5009,7 +5009,7 @@ }, { "cell_type": "code", - "execution_count": 119, + "execution_count": 47, "metadata": {}, "outputs": [], "source": [ @@ -5020,7 +5020,7 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 48, "metadata": {}, "outputs": [ { @@ -5064,13 +5064,13 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 49, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
GridSearchCV(cv=5,\n",
+       "
GridSearchCV(cv=5,\n",
        "             estimator=Pipeline(steps=[('preprocessing',\n",
        "                                        ColumnTransformer(remainder='passthrough',\n",
        "                                                          transformers=[('scaling',\n",
@@ -5489,7 +5489,7 @@
        "                                       ('SVM', SVC())]),\n",
        "             param_grid={'SVM__C': [0.001, 0.01, 0.1, 1, 10, 500],\n",
        "                         'SVM__gamma': [0.001, 0.01, 0.1, 1, 10, 500, 'auto']},\n",
-       "             scoring='f1')
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
['limit_balance', 'pay_amt_1', 'pay_amt_2', 'pay_amt_3', 'pay_amt_4', 'pay_amt_5', 'pay_amt_6']
StandardScaler()
['pay_1', 'pay_2', 'pay_3', 'pay_4', 'pay_5', 'pay_6']
passthrough
" ], "text/plain": [ "GridSearchCV(cv=5,\n", @@ -5536,7 +5536,7 @@ " scoring='f1')" ] }, - "execution_count": 121, + "execution_count": 49, "metadata": {}, "output_type": "execute_result" } @@ -5557,7 +5557,7 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 50, "metadata": {}, "outputs": [], "source": [ @@ -5568,13 +5568,13 @@ }, { "cell_type": "code", - "execution_count": 123, + "execution_count": 51, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Pipeline(steps=[('preprocessing',\n",
+       "
Pipeline(steps=[('preprocessing',\n",
        "                 ColumnTransformer(remainder='passthrough',\n",
        "                                   transformers=[('scaling', StandardScaler(),\n",
        "                                                  ['limit_balance', 'pay_amt_1',\n",
        "                                                   'pay_amt_2', 'pay_amt_3',\n",
        "                                                   'pay_amt_4', 'pay_amt_5',\n",
        "                                                   'pay_amt_6'])])),\n",
-       "                ('SVM', SVC(C=1, gamma='auto'))])
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
['limit_balance', 'pay_amt_1', 'pay_amt_2', 'pay_amt_3', 'pay_amt_4', 'pay_amt_5', 'pay_amt_6']
StandardScaler()
['pay_1', 'pay_2', 'pay_3', 'pay_4', 'pay_5', 'pay_6']
passthrough
SVC(C=1, gamma='auto')
" ], "text/plain": [ "Pipeline(steps=[('preprocessing',\n", @@ -6009,7 +6009,7 @@ " ('SVM', SVC(C=1, gamma='auto'))])" ] }, - "execution_count": 123, + "execution_count": 51, "metadata": {}, "output_type": "execute_result" } @@ -6029,7 +6029,7 @@ }, { "cell_type": "code", - "execution_count": 124, + "execution_count": 52, "metadata": {}, "outputs": [], "source": [ @@ -6040,7 +6040,7 @@ }, { "cell_type": "code", - "execution_count": 125, + "execution_count": 53, "metadata": {}, "outputs": [ { @@ -6059,7 +6059,7 @@ " \n", "\n", "Confusion Matrix : \n", - " \n" + " \n" ] }, { @@ -6105,7 +6105,7 @@ }, { "cell_type": "code", - "execution_count": 126, + "execution_count": 54, "metadata": {}, "outputs": [ { @@ -6144,7 +6144,7 @@ }, { "cell_type": "code", - "execution_count": 127, + "execution_count": 55, "metadata": {}, "outputs": [ { @@ -6213,7 +6213,7 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 56, "metadata": {}, "outputs": [], "source": [