diff --git a/practice_problems/machine_learning_problems.ipynb b/practice_problems/machine_learning_problems.ipynb
index ff94aca..497a2bc 100644
--- a/practice_problems/machine_learning_problems.ipynb
+++ b/practice_problems/machine_learning_problems.ipynb
@@ -16,7 +16,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -37,12 +37,12 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# Specify the path to the .db file\n",
- "db_path = \"C:\\\\Users\\\\agomu\\\\Python\\\\github\\\\poke_api\\\\pokemon.db\"\n",
+ "db_path = \"/Users/kelechiagomuo/Documents/Python/poke_api/pokemon.db\"\n",
"\n",
"# Establish a connection to the SQLite database\n",
"conn = sqlite3.connect(db_path)\n",
@@ -69,7 +69,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -301,7 +301,7 @@
"max 120.000000 "
]
},
- "execution_count": 3,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -312,7 +312,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -369,25 +369,25 @@
},
{
"cell_type": "code",
- "execution_count": 23,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "0 grass/poison\n",
- "1 grass/poison\n",
- "2 grass/poison\n",
- "3 fire\n",
- "4 fire\n",
- " ... \n",
- "493 ghost/poison\n",
- "494 water\n",
- "495 water/ice\n",
- "496 normal\n",
- "497 normal\n",
- "Name: totaltype, Length: 498, dtype: object\n"
+ "0 grass/poison\n",
+ "1 grass/poison\n",
+ "2 grass/poison\n",
+ "3 fire\n",
+ "4 fire\n",
+ " ... \n",
+ "504 fighting/poison\n",
+ "505 fighting\n",
+ "506 fighting/fire\n",
+ "507 fighting/water\n",
+ "508 poison/ground\n",
+ "Name: totaltype, Length: 509, dtype: object\n"
]
}
],
@@ -400,7 +400,7 @@
},
{
"cell_type": "code",
- "execution_count": 24,
+ "execution_count": 9,
"metadata": {},
"outputs": [
{
@@ -413,12 +413,12 @@
"3 0\n",
"4 0\n",
" ..\n",
- "493 1\n",
- "494 0\n",
- "495 1\n",
- "496 0\n",
- "497 0\n",
- "Name: twotypes, Length: 498, dtype: int64\n"
+ "504 1\n",
+ "505 0\n",
+ "506 1\n",
+ "507 1\n",
+ "508 1\n",
+ "Name: twotypes, Length: 509, dtype: int64\n"
]
}
],
@@ -430,7 +430,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -499,8 +499,8 @@
"
grassland | \n",
" grass | \n",
" poison | \n",
- " grass,poison | \n",
- " True | \n",
+ " grass/poison | \n",
+ " 1 | \n",
" \n",
" \n",
" | 1 | \n",
@@ -523,8 +523,8 @@
" grassland | \n",
" grass | \n",
" poison | \n",
- " grass,poison | \n",
- " True | \n",
+ " grass/poison | \n",
+ " 1 | \n",
"
\n",
" \n",
" | 2 | \n",
@@ -547,8 +547,8 @@
" grassland | \n",
" grass | \n",
" poison | \n",
- " grass,poison | \n",
- " True | \n",
+ " grass/poison | \n",
+ " 1 | \n",
"
\n",
" \n",
" | 3 | \n",
@@ -572,7 +572,7 @@
" fire | \n",
" | \n",
" fire | \n",
- " False | \n",
+ " 0 | \n",
"
\n",
" \n",
" | 4 | \n",
@@ -596,7 +596,7 @@
" fire | \n",
" | \n",
" fire | \n",
- " False | \n",
+ " 0 | \n",
"
\n",
" \n",
"\n",
@@ -626,16 +626,16 @@
"4 20 medium-slow generation-i mountain fire \n",
"\n",
" type_name_2 totaltype twotypes \n",
- "0 poison grass,poison True \n",
- "1 poison grass,poison True \n",
- "2 poison grass,poison True \n",
- "3 fire False \n",
- "4 fire False \n",
+ "0 poison grass/poison 1 \n",
+ "1 poison grass/poison 1 \n",
+ "2 poison grass/poison 1 \n",
+ "3 fire 0 \n",
+ "4 fire 0 \n",
"\n",
"[5 rows x 29 columns]"
]
},
- "execution_count": 5,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -653,7 +653,7 @@
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@@ -663,7 +663,7 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 12,
"metadata": {},
"outputs": [
{
@@ -717,7 +717,7 @@
},
{
"cell_type": "code",
- "execution_count": 22,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
@@ -729,12 +729,12 @@
" bug 0.50 0.33 0.40 12\n",
" dark 0.00 0.00 0.00 4\n",
" dragon 1.00 0.67 0.80 3\n",
- " electric 0.75 0.86 0.80 7\n",
+ " electric 0.78 1.00 0.88 7\n",
" fairy 0.00 0.00 0.00 2\n",
" fighting 1.00 0.33 0.50 3\n",
" fire 0.29 0.25 0.27 8\n",
" ghost 0.00 0.00 0.00 4\n",
- " grass 0.20 0.25 0.22 8\n",
+ " grass 0.22 0.25 0.24 8\n",
" ground 0.00 0.00 0.00 3\n",
" ice 0.00 0.00 0.00 3\n",
" normal 0.50 0.54 0.52 13\n",
@@ -742,11 +742,11 @@
" psychic 0.22 0.50 0.31 4\n",
" rock 0.60 0.50 0.55 6\n",
" steel 0.00 0.00 0.00 2\n",
- " water 0.15 0.29 0.20 14\n",
+ " water 0.14 0.29 0.19 14\n",
"\n",
- " accuracy 0.33 100\n",
+ " accuracy 0.34 100\n",
" macro avg 0.31 0.27 0.27 100\n",
- "weighted avg 0.34 0.33 0.32 100\n",
+ "weighted avg 0.34 0.34 0.33 100\n",
"\n"
]
},
@@ -754,11 +754,11 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "c:\\Users\\agomu\\anaconda3\\lib\\site-packages\\sklearn\\metrics\\_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n",
+ "/Users/kelechiagomuo/anaconda3/lib/python3.10/site-packages/sklearn/metrics/_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n",
" _warn_prf(average, modifier, msg_start, len(result))\n",
- "c:\\Users\\agomu\\anaconda3\\lib\\site-packages\\sklearn\\metrics\\_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n",
+ "/Users/kelechiagomuo/anaconda3/lib/python3.10/site-packages/sklearn/metrics/_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n",
" _warn_prf(average, modifier, msg_start, len(result))\n",
- "c:\\Users\\agomu\\anaconda3\\lib\\site-packages\\sklearn\\metrics\\_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n",
+ "/Users/kelechiagomuo/anaconda3/lib/python3.10/site-packages/sklearn/metrics/_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n",
" _warn_prf(average, modifier, msg_start, len(result))\n"
]
}
@@ -800,6 +800,13 @@
" - Gen 1, Gen 2, Gen 3\n",
" - 1, 2, 3 respectively"
]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Feature Engineering"
+ ]
}
],
"metadata": {
@@ -818,7 +825,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.7"
+ "version": "3.10.9"
},
"orig_nbformat": 4
},
diff --git a/practice_problems/statistics_and_statistical_models_problems.ipynb b/practice_problems/statistics_and_statistical_models_problems.ipynb
index 4f8b799..e93f98b 100644
--- a/practice_problems/statistics_and_statistical_models_problems.ipynb
+++ b/practice_problems/statistics_and_statistical_models_problems.ipynb
@@ -37,7 +37,7 @@
"\n",
"\n",
"# Specify the path to the .db file\n",
- "db_path = \"C:\\\\Users\\\\agomu\\\\Python\\\\github\\\\poke_api\\\\pokemon.db\"\n",
+ "db_path = \"/Users/kelechiagomuo/Documents/Python/poke_api/pokemon.db\"\n",
"\n",
"# Establish a connection to the SQLite database\n",
"conn = sqlite3.connect(db_path)\n",