{"id":17817660,"url":"https://github.com/codelixir/linear-regression","last_synced_at":"2025-04-02T09:13:55.325Z","repository":{"id":233798053,"uuid":"365469641","full_name":"codelixir/linear-regression","owner":"codelixir","description":"Understanding Linear Regression and Bias-Variance tradeoff. As a part of the MDL course, Spring 2021.","archived":false,"fork":false,"pushed_at":"2021-05-08T10:09:24.000Z","size":658,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T00:19:20.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelixir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-05-08T09:11:58.000Z","updated_at":"2021-05-08T10:09:26.000Z","dependencies_parsed_at":"2024-04-17T11:18:34.180Z","dependency_job_id":"e393c5c3-f0d7-4087-8bd8-c12a8aee6fc3","html_url":"https://github.com/codelixir/linear-regression","commit_stats":null,"previous_names":["codelixir/linear-regression"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelixir%2Flinear-regression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelixir%2Flinear-regression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelixir%2Flinear-regression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelixir%2Flinear-regression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelixir","download_url":"https://codeload.github.com/codelixir/linear-regression/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246785453,"owners_count":20833494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T16:44:40.896Z","updated_at":"2025-04-02T09:13:55.298Z","avatar_url":"https://github.com/codelixir.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![forthebadge](https://forthebadge.com/images/badges/powered-by-netflix.svg)](https://forthebadge.com)\n\nThe code uses the python libraries [numpy](https://numpy.org/doc/stable/), [matplotlib](https://matplotlib.org/stable/contents.html), [pickle](https://docs.python.org/3/library/pickle.html), [pandas](https://pandas.pydata.org/docs/getting_started/overview.html) and [scikit-learn](https://scikit-learn.org/stable/). The official documentations of these libraries have been linked.\n\n#### Contributors\n[Dhruvee Birla](https://github.com/dhruvxx) and myself.\n\nThis assignment was done as a part of the Machine, Data and Learning course, Spring 2021.\n\n---\n\n# Linear Regression\n\nTask 1 has been answered in the report ([report.pdf](https://github.com/codelixir/linear-regression/blob/main/report.pdf)). The notebook ([code.ipynb](https://github.com/codelixir/linear-regression/blob/main/code.ipynb)) contains the remaining tasks. The train and test data used in these tasks are in the [data](https://github.com/codelixir/linear-regression/tree/main/data) directory. The report also contains observations and conclusions of tasks 2-4.\n\n## Task 1: Linear Regression\n\nUnderstanding Linear Regression, and the method `LinearRegression.fit()`.\n\n## Task 2: Calculating Bias and Variance\n\nResample and train the given data, and calculate the bias and variance of the trained model.\n\nThe bias and variance is calculated for the following class of functions:\n```\ny = ax + b\ny = ax^2 + bx + c\ny = ax^3 + bx^2 + cx + d\n```\nAnd so on till polynomial of degree 20.\n\n## Task 3: Calculating Irreducible Error\n\nTabulating values of irredicible error for the models in Task 2, and observing the changes, if any.\n\n## Task 4: Plotting Bias\u003csup\u003e2\u003c/sup\u003e - Variance Graph\n\nPlotting the graph and evaluating which models are underfit or overfit, and then using this plot to determine the type of train and test data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelixir%2Flinear-regression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelixir%2Flinear-regression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelixir%2Flinear-regression/lists"}