python-scripts/scripts/Linear Regression/example implementation/Linear Regression.ipynb

335 lines
99 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 34,
"id": "05f41765",
"metadata": {},
"outputs": [],
"source": [
"import pandas\n",
"from pandas import DataFrame\n",
"import matplotlib.pyplot as plt\n",
"from sklearn.linear_model import LinearRegression"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "7f82f718",
"metadata": {},
"outputs": [],
"source": [
"data = pandas.read_csv('cost_revenue_clean.csv')"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "656efe3f",
"metadata": {},
"outputs": [],
"source": [
"x= DataFrame(data, columns = ['production_budget_usd'])\n",
"y= DataFrame(data, columns = ['worldwide_gross_usd'])"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "6db0a71e",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmkAAAGDCAYAAABwRoerAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAACC/ElEQVR4nO39eZxk2XXQ+/7WGWLOObPmuXqoHmyVpHKrpe6WZSxZni3A0DZGBl+BDB/DB4FtLvB4cOHBgwsWGDBGbmw/28KYNlfGLey2ZQlsqaulllTdakk9VXfNlVWVVTlGZMxn2O+PcyIqh4jMyKyMysjM9f186lOVEZER+8SJyrNy7bXXFmMMSimllFKqt1ibPQCllFJKKbWcBmlKKaWUUj1IgzSllFJKqR6kQZpSSimlVA/SIE0ppZRSqgdpkKaUUkop1YM0SFNKKaWU6kEapCmllFJK9SAN0pRSd0RE/oKInBGRoojcEJE/EJHH7/A5L4nI+zdgXP91Ha9biY9lQkR+TURydzIOpZRaLw3SlFLrJiJ/B/h54P8L7AYOAb8I/NAmDqvhe4Fn1/F9P2CMyQEngbcDf38jB6WUUp3SIE0ptS4iMg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E8iLycvznH3VrPEoppZRSW4nTxef2gZ82xrwkIn3AiyLyWWPMa0se95wx5vu7OA6llFJKqS2na5k0Y8wNY8xL8b/ngdeB/d16PaWUUkqp7eSu1KSJyBHg7cCXW9z9bhH5uoj8gYg81Ob7PyoiZ0TkzOTkZDeHqpRSSinVE7oepIlIDvgU8DFjTGHJ3S8Bh40xbwP+A/C7rZ7DGPOUMeaUMebU2NhYV8erlFJKKdULuhq
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.scatter(x,y,alpha=.4)\n",
"plt.xlim(0,4.5e8)\n",
"plt.ylim(0,3e9)\n",
"plt.xlabel(\"Budget\")\n",
"plt.ylabel(\"Revenue\")\n",
"plt.title(\"Cost v/s Revenue\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 38,
"id": "ec3fb414",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"LinearRegression()"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# y = theta_0 + theta_1*X\n",
"rgr = LinearRegression()\n",
"rgr.fit(x,y)"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "40be1d77",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[3.11150918]])"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#theta_1 or slope\n",
"th0= rgr.coef_ \n",
"th0"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "e4c31635",
"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>production_budget_usd</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>10000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>400000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>750000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>10000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5029</th>\n",
" <td>225000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5030</th>\n",
" <td>215000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5031</th>\n",
" <td>306000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5032</th>\n",
" <td>200000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5033</th>\n",
" <td>425000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5034 rows × 1 columns</p>\n",
"</div>"
],
"text/plain": [
" production_budget_usd\n",
"0 1000000\n",
"1 10000\n",
"2 400000\n",
"3 750000\n",
"4 10000\n",
"... ...\n",
"5029 225000000\n",
"5030 215000000\n",
"5031 306000000\n",
"5032 200000000\n",
"5033 425000000\n",
"\n",
"[5034 rows x 1 columns]"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#theta_0 or c\n",
"th1 = rgr.intercept_\n",
"th1\n",
"Y=rgr.predict(x)\n",
"x"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "0d71ef51",
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmkAAAGDCAYAAABwRoerAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zL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ShBBCCHHdOTaRoy9h0ZewMZSiL2HTl7A4NpHb6KGtmIQ0IYQQQlx35sou6fjCVV3puMVc2d2gEa2ehDQhhBBCXHeG0jHKNX/BbeWaz1A6tkEjWj0JaUIIIYS47hwcz1J0fIqOR6g1Rcej6PgcHM9u9NBWTEKaEEIIIa47Y9kkh24fJRkzmS3VSMZMDt0+uql2d0oLDiGEEEJcl8ayyU0VyhaTmTQhhBBCiB4kIU0IIYQQogdJSBNCCCGE6EES0oQQQgghepCENCGEEEKIHiQhTQghhBCiB0lIE0IIIYToQRLShBBCCCF6kIQ0IYQQQogeJCFNCCGEEKIHSUgTQgghhOhBEtKEEEIIIXqQhDQhhBBCiB4kIU0IIYQQogdJSBNCCCGE6EES0oQQQgghepCENCGEEEKIHiQhTQghhBCiB0lIE0IIIYToQRLShBBCCCF6kIQ0IYQQQogeJCFNCCGEEKIHSUgTQgghhOhBXQtpSqmdSqkvK6VeVkq9qJT66Tb3eVAplVdKfav+v1/p1niEEEIIITYTq4uP7QM/p7V+RinVBzytlDqitX5p0f2+qrX+7i6OQwghhBBi0+naTJrWelJr/Uz970XgZWBHt55PCCGEEOJ6ck3WpCml9gBvBr7Z5tP3K6WOKaU+p5R6Q4ev/7BS6qhS6ujMzEw3hyqEEEII0RO6HtKUUhngL4F/qrUuLPr0M8B
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.scatter(x,y,alpha=.3)\n",
"\n",
"plt.scatter(x,Y) \n",
"plt.plot(x['production_budget_usd'],Y,color='black') #to convert dataframe to an array \n",
"plt.xlim(0,450000000)\n",
"plt.ylim(0,3000000000)\n",
"plt.xlabel(\"Budget\")\n",
"plt.ylabel(\"Revenue\")\n",
"plt.title(\"Cost v/s Revenue\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "ba3aa345",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"numpy.ndarray"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(Y)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "49344ba8",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "c8d5afb5",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "c10e871e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ad6ae4a1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}