{ "metadata": { "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.3-final" }, "orig_nbformat": 2, "kernelspec": { "name": "python3", "display_name": "Python 3", "language": "python" } }, "nbformat": 4, "nbformat_minor": 2, "cells": [ { "source": [ "## Linear and Polynomial Regression for Pumpkin Pricing - Lesson 3\n", "\n", "Load up required libraries and dataset. Convert the data to a dataframe containing a subset of the data: \n", "\n", "- Only get pumpkins priced by the bushel\n", "- Convert the date to a month\n", "- Calculate the price to be an average of high and low prices\n", "- Convert the price to reflect the pricing by bushel quantity" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " City Name Type Package Variety Sub Variety Grade Date \\\n", "0 BALTIMORE NaN 24 inch bins NaN NaN NaN 4/29/17 \n", "1 BALTIMORE NaN 24 inch bins NaN NaN NaN 5/6/17 \n", "2 BALTIMORE NaN 24 inch bins HOWDEN TYPE NaN NaN 9/24/16 \n", "3 BALTIMORE NaN 24 inch bins HOWDEN TYPE NaN NaN 9/24/16 \n", "4 BALTIMORE NaN 24 inch bins HOWDEN TYPE NaN NaN 11/5/16 \n", "\n", " Low Price High Price Mostly Low ... Unit of Sale Quality Condition \\\n", "0 270.0 280.0 270.0 ... NaN NaN NaN \n", "1 270.0 280.0 270.0 ... NaN NaN NaN \n", "2 160.0 160.0 160.0 ... NaN NaN NaN \n", "3 160.0 160.0 160.0 ... NaN NaN NaN \n", "4 90.0 100.0 90.0 ... NaN NaN NaN \n", "\n", " Appearance Storage Crop Repack Trans Mode Unnamed: 24 Unnamed: 25 \n", "0 NaN NaN NaN E NaN NaN NaN \n", "1 NaN NaN NaN E NaN NaN NaN \n", "2 NaN NaN NaN N NaN NaN NaN \n", "3 NaN NaN NaN N NaN NaN NaN \n", "4 NaN NaN NaN N NaN NaN NaN \n", "\n", "[5 rows x 26 columns]" ], "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
City NameTypePackageVarietySub VarietyGradeDateLow PriceHigh PriceMostly Low...Unit of SaleQualityConditionAppearanceStorageCropRepackTrans ModeUnnamed: 24Unnamed: 25
0BALTIMORENaN24 inch binsNaNNaNNaN4/29/17270.0280.0270.0...NaNNaNNaNNaNNaNNaNENaNNaNNaN
1BALTIMORENaN24 inch binsNaNNaNNaN5/6/17270.0280.0270.0...NaNNaNNaNNaNNaNNaNENaNNaNNaN
2BALTIMORENaN24 inch binsHOWDEN TYPENaNNaN9/24/16160.0160.0160.0...NaNNaNNaNNaNNaNNaNNNaNNaNNaN
3BALTIMORENaN24 inch binsHOWDEN TYPENaNNaN9/24/16160.0160.0160.0...NaNNaNNaNNaNNaNNaNNNaNNaNNaN
4BALTIMORENaN24 inch binsHOWDEN TYPENaNNaN11/5/1690.0100.090.0...NaNNaNNaNNaNNaNNaNNNaNNaNNaN
\n

5 rows × 26 columns

\n
" }, "metadata": {}, "execution_count": 1 } ], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "pumpkins = pd.read_csv('../../data/US-pumpkins.csv')\n", "\n", "pumpkins.head()\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Month Variety City Package Low Price High Price Price\n", "70 1 3 1 0 5 3 13.636364\n", "71 1 3 1 0 10 7 16.363636\n", "72 2 3 1 0 10 7 16.363636\n", "73 2 3 1 0 9 6 15.454545\n", "74 2 3 1 0 5 3 13.636364" ], "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
MonthVarietyCityPackageLow PriceHigh PricePrice
7013105313.636364
71131010716.363636
72231010716.363636
7323109615.454545
7423105313.636364
\n
" }, "metadata": {}, "execution_count": 2 } ], "source": [ "from sklearn.preprocessing import LabelEncoder\n", "\n", "pumpkins = pumpkins[pumpkins['Package'].str.contains('bushel', case=True, regex=True)]\n", "\n", "new_columns = ['Package', 'Variety', 'City Name', 'Month', 'Low Price', 'High Price', 'Date']\n", "\n", "pumpkins = pumpkins.drop([c for c in pumpkins.columns if c not in new_columns], axis=1)\n", "\n", "price = (pumpkins['Low Price'] + pumpkins['High Price']) / 2\n", "\n", "month = pd.DatetimeIndex(pumpkins['Date']).month\n", "\n", "new_pumpkins = pd.DataFrame({'Month': month, 'Variety': pumpkins['Variety'], 'City': pumpkins['City Name'], 'Package': pumpkins['Package'], 'Low Price': pumpkins['Low Price'],'High Price': pumpkins['High Price'], 'Price': price})\n", "\n", "new_pumpkins.loc[new_pumpkins['Package'].str.contains('1 1/9'), 'Price'] = price/1.1\n", "\n", "new_pumpkins.loc[new_pumpkins['Package'].str.contains('1/2'), 'Price'] = price*2\n", "\n", "new_pumpkins.iloc[:, 0:-1] = new_pumpkins.iloc[:, 0:-1].apply(LabelEncoder().fit_transform)\n", "\n", "new_pumpkins.head()\n" ] }, { "source": [ "A scatterplot reminds us that we only have month data from August through December. We probably need more data to be able to draw conclusions in a linear fashion." ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 3 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAZ+0lEQVR4nO3df2yc9X0H8Pc7V6dxIZ3JcNLEiWuaRa42Ipz2lARZmjyoZwQIDBobEWHZVBE2CQmUzm3SRC2VgojmEtCmiikpqNlCaZGaGQR0nhWIqiLi9kICDgpeoE0CThS7UJdATQmXz/64x65zfh7f89j33PPj3i/Juns+95zvo6+cT577Pt8fNDOIiEjyzIk6ARERmRkVcBGRhFIBFxFJKBVwEZGEUgEXEUmoT1Xywy6//HJramqq5EeKiCTeoUOHfmNm9cXxihbwpqYm5HK5Sn6kiEjikTzpFlcXiohIQqmAi4gklAq4iEhCqYCLiCSUCriISEJVdBSKhK/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GsjUF7+ckrkr8x57M3Afih2+eXu73idgW+GsCbZvYrM/sYwI9Q2DxispsB/KcVHARQN74yYsR5VZy5b7YxWRRt5SevSJjZGTN7xXl+DsAxAMW7EVS8zXzmVXFOG3zgHNY4P8WjHqJoLz95RYLkUgA3APi+xyllba+4FfAGAG9POn4HU/+Q/ZwTRV4AcLXzte6nJP8i5Jz8iKKt/Iq0rVjYpGQVCldvk0XaZtPkBUTQZk53wBEUlozuM7NYtJePvIBo/sYeAfB1ABc8Xi9re8WtgNMlVvw/q59zys3PZ76CwnoFVwH4dwA9IefkRxRt5UekbUXyUgA/AXCfmb1f/LLLWyrSZiXyiqTNzCxvZi0AlgJYTfLKolMiaS8feVW8vUjeCGDYzA5Nd5pLbMbtFbcC/g6AZZOOlwI4PYNzKp6Xmb0//rXOzJ4HUEPy8pDzKiWKtiopyrYiWYNCkXzCzPa5nBJJm5XKK+q/LzMbBXAAUzc4j/RvzCuviNqrFcBNJE+g0M16Dcm9ReeUtb3iVsB/CWAFyStIzgVwOwqbR0z2DIC/d+7mrgXwOzM7E3VeJD9Hks7z1Si07bsh51VKFG1VUlRt5XzmYwCOmdlOj9Mq3mZ+8oqizUjWk6xzntcC+AqAN4pOi6K9SuYVRXuZ2RYzW2pmTSjUiBfMbH3RaWVtr5LrgVeSmX1C8h4AvSiM/HjczF4n+U/O6/8B4HkU7uS+CeD3AP4xJnn9DYB/JvkJgDEAt5tz2zksLGy20QbgcpLvAPg2Cjd0Imsrn3lVvK0crQDuBDDg9J8CwDcBNE7KLYo285NXFG22GMAekhkUCuBTZvZs1P8efeYV1d/YFGG2l6bSi4gkVNy6UERExCcVcBGRhFIBFxFJKBVwEZGEUgEXEUkoFXARkYRSARcRSaj/B+NSsNvokDcNAAAAAElFTkSuQmCC\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "import matplotlib.pyplot as plt\n", "plt.scatter('Month','Price',data=new_pumpkins)" ] }, { "source": [ "Try some different correlations" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "0.32363971816089226\n0.6061712937226021\n" ] } ], "source": [ "print(new_pumpkins['City'].corr(new_pumpkins['Price']))\n", "\n", "print(new_pumpkins['Package'].corr(new_pumpkins['Price']))\n" ] }, { "source": [ "Drop unused columns" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\nInt64Index: 415 entries, 70 to 1742\nData columns (total 7 columns):\n # Column Non-Null Count Dtype \n--- ------ -------------- ----- \n 0 Month 415 non-null int64 \n 1 Variety 415 non-null int64 \n 2 City 415 non-null int64 \n 3 Package 415 non-null int64 \n 4 Low Price 415 non-null int64 \n 5 High Price 415 non-null int64 \n 6 Price 415 non-null float64\ndtypes: float64(1), int64(6)\nmemory usage: 25.9 KB\n" ] } ], "source": [ "\n", "new_pumpkins.dropna(inplace=True)\n", "new_pumpkins.info()\n", "\n", "\n" ] }, { "source": [ "Create a new dataframe" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Package Price\n", "70 0 13.636364\n", "71 0 16.363636\n", "72 0 16.363636\n", "73 0 15.454545\n", "74 0 13.636364\n", "... ... ...\n", "1738 2 30.000000\n", "1739 2 28.750000\n", "1740 2 25.750000\n", "1741 2 24.000000\n", "1742 2 24.000000\n", "\n", "[415 rows x 2 columns]" ], "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
PackagePrice
70013.636364
71016.363636
72016.363636
73015.454545
74013.636364
.........
1738230.000000
1739228.750000
1740225.750000
1741224.000000
1742224.000000
\n

415 rows × 2 columns

\n
" }, "metadata": {}, "execution_count": 6 } ], "source": [ "new_columns = ['Package', 'Price']\n", "lin_pumpkins = new_pumpkins.drop([c for c in new_pumpkins.columns if c not in new_columns], axis='columns')\n", "\n", "lin_pumpkins\n" ] }, { "source": [ "Set X and y arrays to correspond to Package and Price" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "X = lin_pumpkins.values[:, :1]\n", "y = lin_pumpkins.values[:, 1:2]\n" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Model Accuracy: 0.3315342327998987\n" ] } ], "source": [ "from sklearn.linear_model import LinearRegression\n", "from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error\n", "from sklearn.model_selection import train_test_split\n", "\n", "\n", "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n", "lin_reg = LinearRegression()\n", "lin_reg.fit(X_train,y_train)\n", "\n", "pred = lin_reg.predict(X_test)\n", "\n", "accuracy_score = lin_reg.score(X_train,y_train)\n", "print('Model Accuracy: ', accuracy_score)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAeyklEQVR4nO3df5RkZX3n8fenq0ekAWGUFkewu1ZDIDNERpxDIJjsyIy7iC6owayexp0Yd1umxeCaPYj2bsSTtEdzREXN9KZVcFwriRCjENQ1TAui5whmRvk5I4o63StMmBFBfrSEdM93/6jb0zU9/aNuTd269ePzOqdPVz11b93vXJpPP/3cW8+jiMDMzDpHV94FmJlZYzn4zcw6jIPfzKzDOPjNzDqMg9/MrMN0511ANY4//vgoFot5l2Fm1lJ27Njxi4jond/eEsFfLBbZvn173mWYmbUUSRMLtXuox8yswzj4zcw6jIPfzKzDOPjNzDqMg9/M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RHxrYq2T0laC8wAv5m0vwK4PiL2A/8i6Zak/RTgNODmZHqYApD7nEjW/hz81ol+nUzNe4CkTwIfjYgbJa0Hrpx9iYWnv50GdgD/EZgN/v8OPAycTvmv6acr3mMhAu6LiLNr+2eY1cZDPWZlxwIPJo83VbT/E3Dp7BNJK5OHAfwxcKrm1lI+FtiT9OzfQrkHD+VhpD9IxvpPoDwRHcD9QK+kA0M/ao6FeKzNOfjNyq4Erpf0beAXFe1/AaxMbv28C3jl7AsRMUN5GOiVkoaALcAmSbdTHuZ5Ktn0S5TnU78X+GvKq2T9KlmO8yLgw8l73wn8bnb/RLMyz85p1gCSjo6IJyU9D/gecE5E/EvedVln8hi/WWPclCwC8izgzx36lif3+M3MOozH+M3MOoyD38yswzj4zcw6jIPfzKzDOPjNzDrM/wd9ANIgXQUvFwAAAABJRU5ErkJggg==\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "\n", "plt.scatter(X_test, y_test, color='black')\n", "plt.plot(X_test, pred, color='blue', linewidth=3)\n", "\n", "plt.xlabel('Package')\n", "plt.ylabel('Price')\n", "\n", "plt.show()\n", "\n" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "array([[33.15655975]])" ] }, "metadata": {}, "execution_count": 10 } ], "source": [ "lin_reg.predict( np.array([ [2.75] ]) )" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Month Variety City Package Price\n", "70 1 3 1 0 13.636364\n", "71 1 3 1 0 16.363636\n", "72 2 3 1 0 16.363636\n", "73 2 3 1 0 15.454545\n", "74 2 3 1 0 13.636364\n", "... ... ... ... ... ...\n", "1738 1 1 9 2 30.000000\n", "1739 1 1 9 2 28.750000\n", "1740 1 1 9 2 25.750000\n", "1741 1 1 9 2 24.000000\n", "1742 1 1 9 2 24.000000\n", "\n", "[415 rows x 5 columns]" ], "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
MonthVarietyCityPackagePrice
70131013.636364
71131016.363636
72231016.363636
73231015.454545
74231013.636364
..................
1738119230.000000
1739119228.750000
1740119225.750000
1741119224.000000
1742119224.000000
\n

415 rows × 5 columns

\n
" }, "metadata": {}, "execution_count": 11 } ], "source": [ "new_columns = ['Variety', 'Package', 'City', 'Month', 'Price']\n", "poly_pumpkins = new_pumpkins.drop([c for c in new_pumpkins.columns if c not in new_columns], axis='columns')\n", "\n", "poly_pumpkins" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ], "text/html": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Month Variety City Package Price
Month1.0000000.171330-0.188728-0.144847-0.148783
Variety0.1713301.000000-0.248441-0.614855-0.863479
City-0.188728-0.2484411.0000000.3016040.323640
Package-0.144847-0.6148550.3016041.0000000.606171
Price-0.148783-0.8634790.3236400.6061711.000000
" }, "metadata": {}, "execution_count": 12 } ], "source": [ "corr = poly_pumpkins.corr()\n", "corr.style.background_gradient(cmap='coolwarm')" ] }, { "source": [ "Select the Package/Price columns" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "X=poly_pumpkins.iloc[:,3:4].values\n", "y=poly_pumpkins.iloc[:,4:5].values\n" ] }, { "source": [ "Create Polynomial Regression model" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXhU5dn48e+dhSWALBopBEmqxSVqpRopFuuCay3W/RWL1g1GiftGlWjFJW51+7mAxopSSd21cuFSKRVFrShuaMT31SpBFlksIBAUSO7fH88ZJhOyzCRz5sxyf65rrszzzHJuDsk9Z55VVBVjjDHZIyfoAIwxxiSXJX5jjMkylviNMSbLWOI3xpgsY4nfGGOyTF7QAcRiu+2205KSkqDDMMaYtPL++++vVNXCpvVpkfhLSkqYO3du0GEYY0xaEZHa5uqtqccYY7KMJX5jjMkylviNMSbLWOI3xpg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\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "from sklearn.preprocessing import PolynomialFeatures\n", "from sklearn.pipeline import make_pipeline\n", "\n", "pipeline = make_pipeline(PolynomialFeatures(4), LinearRegression())\n", "\n", "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n", "\n", "pipeline.fit(np.array(X_train), y_train)\n", "\n", "y_pred=pipeline.predict(X_test)\n", "\n", "df = pd.DataFrame({'x': X_test[:,0], 'y': y_pred[:,0]})\n", "df.sort_values(by='x',inplace = True)\n", "points = pd.DataFrame(df).to_numpy()\n", "\n", "plt.plot(points[:, 0], points[:, 1],color=\"blue\", linewidth=3)\n", "plt.xlabel('Package')\n", "plt.ylabel('Price')\n", "\n", "plt.scatter(X,y, color=\"black\")\n", "\n", "plt.show()\n", "\n" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Model Accuracy: 0.8537946517073784\n" ] } ], "source": [ "accuracy_score = pipeline.score(X_train,y_train)\n", "print('Model Accuracy: ', accuracy_score)\n", "\n" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "array([[46.34509342]])" ] }, "metadata": {}, "execution_count": 16 } ], "source": [ "pipeline.predict( np.array([ [2.75] ]) )" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ] }