Skip to content

Commit

Permalink
imblearn installation
Browse files Browse the repository at this point in the history
  • Loading branch information
kroopeshrajput committed Jul 17, 2024
1 parent 877e0dd commit 305eb29
Showing 1 changed file with 216 additions and 1 deletion.
217 changes: 216 additions & 1 deletion car_evaluation_knn_smote.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,229 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>buying</th>\n",
" <th>maint</th>\n",
" <th>doors</th>\n",
" <th>persons</th>\n",
" <th>lug_boot</th>\n",
" <th>safety</th>\n",
" <th>outcome</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>vhigh</td>\n",
" <td>vhigh</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>small</td>\n",
" <td>low</td>\n",
" <td>unacc</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>vhigh</td>\n",
" <td>vhigh</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>small</td>\n",
" <td>med</td>\n",
" <td>unacc</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>vhigh</td>\n",
" <td>vhigh</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>small</td>\n",
" <td>high</td>\n",
" <td>unacc</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>vhigh</td>\n",
" <td>vhigh</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>med</td>\n",
" <td>low</td>\n",
" <td>unacc</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>vhigh</td>\n",
" <td>vhigh</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>med</td>\n",
" <td>med</td>\n",
" <td>unacc</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1723</th>\n",
" <td>low</td>\n",
" <td>low</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>med</td>\n",
" <td>med</td>\n",
" <td>good</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1724</th>\n",
" <td>low</td>\n",
" <td>low</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>med</td>\n",
" <td>high</td>\n",
" <td>vgood</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1725</th>\n",
" <td>low</td>\n",
" <td>low</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>big</td>\n",
" <td>low</td>\n",
" <td>unacc</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1726</th>\n",
" <td>low</td>\n",
" <td>low</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>big</td>\n",
" <td>med</td>\n",
" <td>good</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1727</th>\n",
" <td>low</td>\n",
" <td>low</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>big</td>\n",
" <td>high</td>\n",
" <td>vgood</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1728 rows × 7 columns</p>\n",
"</div>"
],
"text/plain": [
" buying maint doors persons lug_boot safety outcome\n",
"0 vhigh vhigh 2 2 small low unacc\n",
"1 vhigh vhigh 2 2 small med unacc\n",
"2 vhigh vhigh 2 2 small high unacc\n",
"3 vhigh vhigh 2 2 med low unacc\n",
"4 vhigh vhigh 2 2 med med unacc\n",
"... ... ... ... ... ... ... ...\n",
"1723 low low 5 5 med med good\n",
"1724 low low 5 5 med high vgood\n",
"1725 low low 5 5 big low unacc\n",
"1726 low low 5 5 big med good\n",
"1727 low low 5 5 big high vgood\n",
"\n",
"[1728 rows x 7 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"car_ev = pd.read_csv(\"C:/Alabs/Datasets/car_evaluation - 1673683069225.csv\")\n",
"car_ev"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 1728 entries, 0 to 1727\n",
"Data columns (total 7 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 buying 1728 non-null object\n",
" 1 maint 1728 non-null object\n",
" 2 doors 1728 non-null int64 \n",
" 3 persons 1728 non-null int64 \n",
" 4 lug_boot 1728 non-null object\n",
" 5 safety 1728 non-null object\n",
" 6 outcome 1728 non-null object\n",
"dtypes: int64(2), object(5)\n",
"memory usage: 94.6+ KB\n"
]
}
],
"source": [
"car_ev.info()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 305eb29

Please sign in to comment.