{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "KRE9dI3nlA6C" }, "source": [ "# Programming Assignment 3 : Linear Regression\n", "\n", "## Instructions:\n", "\n", "## Marks: 100\n", "## Due Date: March, 13, 2022 \n", "\n", "## Instructions \n", "\n", "* Submit your code both as notebook file (.ipynb) and python script (.py) on LMS. The name of both files should be 'RollNo_PA3'. Failing to submit any one of them will result in the reduction of marks.\n", "\n", "* The datasets required for this assignment have been uploaded to LMS. \n", "\n", "* The code MUST be implemented independently. Any plagiarism or cheating of work from others or the internet will be immediately referred to the DC.\n", "\n", "* 10% penalty per day for 3 days after due date. No submissions will be accepted\n", "\n", "after that.\n", "\n", "\n", "* Use procedural programming style and comment your code properly.\n", "\n", "* **Deadline to submit this assignment is 13/03/2022.**\n", "* Make sure to run all blocks before submission.\n", "\n", "### Goal: \n", "\n", "The goal of this assignment is to get you familiar with Linear Regression and to give hands on experience of basic python tools and libraries which will be used in implementing the algorithm.\n", "\n", "### Note:\n", "\n", "You are not allowed to use scikit-learn or any other machine learning toolkit for part 1 and 2. You have to implement your own Linear Regression model from scratch. You may use Pandas, NumPy, Matplotlib and other standard python libraries\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "osHEjCuclA6I" }, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import matplotlib as plt" ] }, { "cell_type": "markdown", "metadata": { "id": "3_mlmXGflA6J" }, "source": [ "# Part 1: Simple Linear Regression (10 Marks)" ] }, { "cell_type": "markdown", "metadata": { "id": "vacnDDnplA6K" }, "source": [ "## Dataset: \n", "The Dataset for this part is provided in the included zip folder within the folder labelled \"DataPart1\". In case you are doing this assignment on colab, please upload the datafile to colab before starting.\n", "\n", "## Pre-Processing:\n", "The dataset you have been provided contains the marketing impact of a company via 3 advertisement mediums (Youtube, Facebook and Newspaper) on their sales. Data is the advertisement budget (in thousands of dollars) along with sales. Before you begin with Simple Linear Regression:\n", " \n", "