{ "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": [ "## Pumpkin Pricing\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": 47, "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": 47 } ], "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": 48, "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": 48 } ], "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": 49, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 49 }, { "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/n8BC6ewdxenQMS+pq0dXR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2+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": 50, "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": 51, "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": 52, "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": 52 } ], "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": 53, "metadata": {}, "outputs": [], "source": [ "X = lin_pumpkins.values[:, :1]\n", "y = lin_pumpkins.values[:, 1:2]\n" ] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Model Accuracy: 0.3470558343642912\nCoefficients: [[4.88720357]]\nMean squared error: 62.582140520848164\nCoefficient of determination: 0.4133978531557345\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=42)\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)\n", "\n", "# The coefficients\n", "print('Coefficients: ', lin_reg.coef_)\n", "# The mean squared error\n", "print('Mean squared error: ',\n", " mean_squared_error(y_test, pred))\n", "# The coefficient of determination: 1 is perfect prediction\n", "print('Coefficient of determination: ',\n", " r2_score(y_test, pred)) " ] }, { "cell_type": "code", "execution_count": 55, "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+WH4yJAAAevUlEQVR4nO3df3RkZZ3n8fcnP1CCKN0S2h6aJIooCygtZDgqnD1Ih11AV3QGZ3GC20ddg4mcgzp7FM2KeDTrjzOK4+ymd6PAtJqZUVdn5SCodPghOjNgNyK/WhQ1aYGWboQ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ZJsWSaMqzAF/naTrJV2QvHeqpFslbZH0PdVgFlQzB7/llqQ24FzgHuCHFOZmfxWF+VI+kGz2EQpfj39FRLwSuKlo/1XAd4DLI+I7FGZ8PDsiTgH+M/CFZNM/A3qAVwD/FXhNsn87hYnALoiIU4GrgZHM/sBmiaaYssEspUOLpji4jcJ8Ny8Hvpb0uA8Bfp2830dh/hQAIuKJ5Gk7MAG8JyJuLWr7n5LWAjPAy5L2M4BvRMQs8FtJNyftLwdOAm5MpodpBeo+J5I1Pwe/5dHTydS8e0n6W+BzEXGtpDOBK+beYvHpb/cAW4D/CMwF//uAR4GTKfxr+o9Fn7EYAfdFxGsq+2OYVcZDPWYFLwAeTp6vL2r/PnDJ3AtJK5KnAbwDOF7zaym/ANie9OzfRqEHD4VhpD9PxvpXUZiIDuABoFPS3qEfLY+FeKzJOfjNCq4AviHpNuCxovZPACuSWz9/Crxu7o2ImKEwDPQ6SUPAKLBe0r9SGOb5Q7LpNynMp34v8H8orJL1+2Q5zguATyeffRfw2uz+iGYFnp3TrAYkPS8idkt6IXAHcHpE/LbedVk+eYzfrDauSxYBOQT4uEPf6sk9fjOznPEYv5lZzjj4zcxyxsFvZpYzDn4zs5xx8JuZ5cz/B9+Z9v/pMtP6AAAAAElFTkSuQmCC\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": 56, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "array([[34.78078482]])" ] }, "metadata": {}, "execution_count": 56 } ], "source": [ "lin_reg.predict( np.array([ [3] ]) )" ] }, { "cell_type": "code", "execution_count": 57, "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": 57 } ], "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": 58, "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": 58 } ], "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": 59, "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": 60, "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", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXyU5bn/8c+VBMSICgpaFkmO1lrjhorLr1p3u6gVbK1Lo6JQo6A97lZJ3WqDR+u+gMblFEuse0VptSrgUU/rElq3iIq1BA0cwQpuUYHk+v1xTyB7ZpKZeWb5vl+veWX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v9DdR7p7KSFHzHX349o9Lannq7dFjVPC3deY2enAXwgzP+5y9zozOzX2+1uBPxNGct8FGoGTMiSuI4FJZrYG+BI4xmPDzqliodjGfsAQM/sAuIQwoBPZuYozrrSfq5i9gOOB12P9pwBTgFGtYovinMUTVxTnbBgww8wKCQnwfnefHfW/xzjjiuoz1kEqz5eW0ouIZKlM60IREZE4KYGLiGQpJXARkSylBC4ikqWUwEVEspQSuIhIllICFxHJUv8fn9D2qlkAnlgAAAAASUVORK5CYII=\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\")\n", "\n", "plt.scatter(X,y, color=\"black\")\n", "\n", "plt.show()\n", "\n" ] }, { "cell_type": "code", "execution_count": 61, "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": null, "metadata": {}, "outputs": [], "source": [] } ] }