You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

691 lines
43 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___\n",
"\n",
"<a href='https://www.udemy.com/user/joseportilla/'><img src='../Pierian_Data_Logo.png'/></a>\n",
"___\n",
"<center><em>Copyright by Pierian Data Inc.</em></center>\n",
"<center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Support Vector Machines\n",
"## SVM - Regression"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The concrete slump test measures the consistency of fresh concrete before it sets. It is performed to check the workability of freshly made concrete, and therefore the ease with which concrete flows. It can also be used as an indicator of an improperly mixed batch.\n",
"\n",
"<img src=\"Types_of_concrete_slump.jpg\">\n",
"\n",
"Our data set consists of various cement properties and the resulting slump test metrics in cm. Later on the set concrete is tested for its compressive strength 28 days later.\n",
"\n",
"Input variables (7)(component kg in one M^3 concrete):\n",
"* Cement\n",
"* Slag\n",
"* Fly ash\n",
"* Water\n",
"* SP\n",
"* Coarse Aggr.\n",
"* Fine Aggr.\n",
"\n",
"Output variables (3):\n",
"* SLUMP (cm)\n",
"* FLOW (cm)\n",
"* **28-day Compressive Strength (Mpa)**\n",
"\n",
"Data Source: https://archive.ics.uci.edu/ml/datasets/Concrete+Slump+Test\n",
"\n",
"*Credit: Yeh, I-Cheng, \"Modeling slump flow of concrete using second-order regressions and artificial neural networks,\" Cement and Concrete Composites, Vol.29, No. 6, 474-480, 2007.*"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv('../DATA/cement_slump.csv')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"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>Cement</th>\n",
" <th>Slag</th>\n",
" <th>Fly ash</th>\n",
" <th>Water</th>\n",
" <th>SP</th>\n",
" <th>Coarse Aggr.</th>\n",
" <th>Fine Aggr.</th>\n",
" <th>SLUMP(cm)</th>\n",
" <th>FLOW(cm)</th>\n",
" <th>Compressive Strength (28-day)(Mpa)</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>273.0</td>\n",
" <td>82.0</td>\n",
" <td>105.0</td>\n",
" <td>210.0</td>\n",
" <td>9.0</td>\n",
" <td>904.0</td>\n",
" <td>680.0</td>\n",
" <td>23.0</td>\n",
" <td>62.0</td>\n",
" <td>34.99</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>163.0</td>\n",
" <td>149.0</td>\n",
" <td>191.0</td>\n",
" <td>180.0</td>\n",
" <td>12.0</td>\n",
" <td>843.0</td>\n",
" <td>746.0</td>\n",
" <td>0.0</td>\n",
" <td>20.0</td>\n",
" <td>41.14</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>162.0</td>\n",
" <td>148.0</td>\n",
" <td>191.0</td>\n",
" <td>179.0</td>\n",
" <td>16.0</td>\n",
" <td>840.0</td>\n",
" <td>743.0</td>\n",
" <td>1.0</td>\n",
" <td>20.0</td>\n",
" <td>41.81</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>162.0</td>\n",
" <td>148.0</td>\n",
" <td>190.0</td>\n",
" <td>179.0</td>\n",
" <td>19.0</td>\n",
" <td>838.0</td>\n",
" <td>741.0</td>\n",
" <td>3.0</td>\n",
" <td>21.5</td>\n",
" <td>42.08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>154.0</td>\n",
" <td>112.0</td>\n",
" <td>144.0</td>\n",
" <td>220.0</td>\n",
" <td>10.0</td>\n",
" <td>923.0</td>\n",
" <td>658.0</td>\n",
" <td>20.0</td>\n",
" <td>64.0</td>\n",
" <td>26.82</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Cement Slag Fly ash Water SP Coarse Aggr. Fine Aggr. SLUMP(cm) \\\n",
"0 273.0 82.0 105.0 210.0 9.0 904.0 680.0 23.0 \n",
"1 163.0 149.0 191.0 180.0 12.0 843.0 746.0 0.0 \n",
"2 162.0 148.0 191.0 179.0 16.0 840.0 743.0 1.0 \n",
"3 162.0 148.0 190.0 179.0 19.0 838.0 741.0 3.0 \n",
"4 154.0 112.0 144.0 220.0 10.0 923.0 658.0 20.0 \n",
"\n",
" FLOW(cm) Compressive Strength (28-day)(Mpa) \n",
"0 62.0 34.99 \n",
"1 20.0 41.14 \n",
"2 20.0 41.81 \n",
"3 21.5 42.08 \n",
"4 64.0 26.82 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Cement 0.445656\n",
"Slag -0.331522\n",
"Fly ash 0.444380\n",
"Water -0.254320\n",
"SP -0.037909\n",
"Coarse Aggr. -0.160610\n",
"Fine Aggr. -0.154532\n",
"SLUMP(cm) -0.223499\n",
"FLOW(cm) -0.124189\n",
"Compressive Strength (28-day)(Mpa) 1.000000\n",
"Name: Compressive Strength (28-day)(Mpa), dtype: float64"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.corr()['Compressive Strength (28-day)(Mpa)']"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhQAAAGrCAYAAACYDg7YAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABN7klEQVR4nO3dd7ycZZ3+8c9F6B0REeklgNQAIQKigqKiIqggRSyIiP5c27q6iwurrq4r9l6IiGADEURZ6S2C9ACBECB0kKJIL1JCzvX747kPGYZzknMyz8ycOXO9X695ZZ77eeb53pOcnPnOXWWbiIiIiFYs0u0KRERERO9LQhEREREtS0IRERERLUtCERERES1LQhEREREtS0IRERERLUtCERERMY5IOkrSfZKuHea8JH1P0s2SrpG0dR1xk1BERESML0cDu87n/JuAieVxMPDjOoImoYiIiBhHbJ8PPDifS/YAfuHKJcCKklZrNW4SioiIiP6yOvDXhuO7SllLFm31BhHj1cDfNuzIuvQ7f+CgToQBYOmr7+pYrBsOWbsjcVa+Sh2JA7DizU91LNY9r1qqY7GeWa5joRhYojPbPay44fy+oNfvyjf/T0s/iKP5fTNhtZs+RNVVMWiq7amtxK9DEoqIiIguG2BgxNeW5KGVBOJuYM2G4zVKWUvS5REREdFlcz0w4kcNTgbeW2Z7bAc8YvveVm+aFoqIiIguG6C+riBJxwI7AS+WdBfweWAxANs/AU4F3gzcDPwTeH8dcZNQREREdNkczx3xtQsaXWN7vwWcN/AvIw44QkkoIiIiuqzOFopuSUIRERHRZXPHQUKRQZnREZJeKuk4SbdIukLSqZI27EI9/rPTMSMiFmQAj/gxViWhiLaTJOAkYJrt9W1v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72+/KIFmUMRURE9DVJiwMbAwZm236my1XqSUkoIiKib0l6M3AEcAsgYF3gQ7ZP62rFelASioiI6FuSbgB2s31zOV4fOMX2xt2tWe/JLI+IiOhnjw0mE8WtwGPdqkwvSwtFRET0LUk/BtYGjqcaQ/FO4E7gbADbGbA5QkkoIiKib0n6+XxO2/aBHatMj0tCERERES3LOhQREdG3JK1LtZ/HOjR8JtrevVt16lVJKCIiop/9AfgZ8H9k2/KWpMsjIiL6lqRLbb+i2/UYD5JQRERE35L0LmAicCbVFuYA2L6ya5XqUenyiIiIfrY58B7gtczr8nA5jlFIC0VERPQtSTcDm2T/jtZlpcyIiOhn1wIrdrsS40G6PCIiop+tCNwg6XKeP4Yi00ZHKQlFRET0s893uwLjRcZQREREX5O0KrBtObzM9n3drE+vyhiKiIjoW5L2Bi6j2hRsb+BSSXt1t1a9KS0UERHRtyRdDbx+sFVC0irA2ba37G7Nek9aKCIiop8t0tTF8QD5bFwoGZQZERH97HRJZwDHluN9gNO6WJ+elS6PiIjoa5LeAexYDi+wfVI369OrklBERETfkbQBsKrtC5vKdwTutX1Ld2rWu9JPFBER/eg7wKNDlD9SzsUoJaGIiIh+tKrtmc2FpWydzlen9yWhiIiIfrTifM4t1alKjCdJKCIioh9Nl/TB5kJJBwFXdKE+PS+DMiMiou+U5bZPAp5hXgIxGVgceLvtv3Wrbr0qCUVERPQtSTsDm5XDWbbP7WZ9elkSioiIiGhZxlBEREREy5JQRERERMuSUERERETLklBEREREy5JQRERERMv+P0Qv8FXp0fjKAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 2 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.heatmap(df.corr(),cmap='viridis')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Cement', 'Slag', 'Fly ash', 'Water', 'SP', 'Coarse Aggr.',\n",
" 'Fine Aggr.', 'SLUMP(cm)', 'FLOW(cm)',\n",
" 'Compressive Strength (28-day)(Mpa)'],\n",
" dtype='object')"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Train | Test Split\n",
"\n",
"Alternatively you could also set this up as a pipline, something like:\n",
"\n",
" >>> from sklearn.pipeline import make_pipeline\n",
" >>> from sklearn.preprocessing import StandardScaler\n",
" >>> from sklearn.svm import SVR\n",
"\n",
" >>> clf = make_pipeline(StandardScaler(), SVR())"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Cement', 'Slag', 'Fly ash', 'Water', 'SP', 'Coarse Aggr.',\n",
" 'Fine Aggr.', 'SLUMP(cm)', 'FLOW(cm)',\n",
" 'Compressive Strength (28-day)(Mpa)'],\n",
" dtype='object')"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.columns"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"X = df.drop('Compressive Strength (28-day)(Mpa)',axis=1)\n",
"y = df['Compressive Strength (28-day)(Mpa)']"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.model_selection import train_test_split"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=101)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.preprocessing import StandardScaler"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"scaler = StandardScaler()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"scaled_X_train = scaler.fit_transform(X_train)\n",
"scaled_X_test = scaler.transform(X_test)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Support Vector Machines - Regression\n",
"\n",
"There are three different implementations of Support Vector Regression: SVR, NuSVR and LinearSVR. LinearSVR provides a faster implementation than SVR but only considers the linear kernel, while NuSVR implements a slightly different formulation than SVR and LinearSVR. See [Implementation details](https://scikit-learn.org/stable/modules/svm.html#svm-implementation-details) for further details."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.svm import SVR,LinearSVR"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Setting C: C is 1 by default and its a reasonable default choice. If you have a lot of noisy observations you should decrease it: decreasing C corresponds to more regularization.\n",
"\n",
"LinearSVC and LinearSVR are less sensitive to C when it becomes large, and prediction results stop improving after a certain threshold. Meanwhile, larger C values will take more time to train, sometimes up to 10 times longer\n",
"\n",
"Epsilon: https://stats.stackexchange.com/questions/259018/meaning-of-epsilon-in-svm-regression"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"base_model = SVR()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"SVR()"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"base_model.fit(scaled_X_train,y_train)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"base_preds = base_model.predict(scaled_X_test)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Evaluation"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.metrics import mean_absolute_error,mean_squared_error"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5.236902091259178"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mean_absolute_error(y_test,base_preds)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6.695914838327133"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.sqrt(mean_squared_error(y_test,base_preds))"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"36.26870967741935"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"y_test.mean()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Grid Search in Attempt for Better Model"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"param_grid = {'C':[0.001,0.01,0.1,0.5,1],\n",
" 'kernel':['linear','rbf','poly'],\n",
" 'gamma':['scale','auto'],\n",
" 'degree':[2,3,4],\n",
" 'epsilon':[0,0.01,0.1,0.5,1,2]}"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"from sklearn.model_selection import GridSearchCV"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"svr = SVR()\n",
"grid = GridSearchCV(svr,param_grid=param_grid)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"GridSearchCV(estimator=SVR(),\n",
" param_grid={'C': [0.001, 0.01, 0.1, 0.5, 1], 'degree': [2, 3, 4],\n",
" 'epsilon': [0, 0.01, 0.1, 0.5, 1, 2],\n",
" 'gamma': ['scale', 'auto'],\n",
" 'kernel': ['linear', 'rbf', 'poly']})"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"grid.fit(scaled_X_train,y_train)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'C': 1, 'degree': 2, 'epsilon': 2, 'gamma': 'scale', 'kernel': 'linear'}"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"grid.best_params_"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"grid_preds = grid.predict(scaled_X_test)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.5128012210762365"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mean_absolute_error(y_test,grid_preds)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.178210305119858"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.sqrt(mean_squared_error(y_test,grid_preds))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Great improvement!"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 1
}