{"id":15718825,"url":"https://github.com/yukti-09/linear-regression","last_synced_at":"2026-05-17T02:43:35.341Z","repository":{"id":125518840,"uuid":"367810077","full_name":"Yukti-09/Linear-Regression","owner":"Yukti-09","description":"A small code for understanding linear regression.","archived":false,"fork":false,"pushed_at":"2021-05-16T07:50:13.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T22:29:33.159Z","etag":null,"topics":["linear-regression","matplotlib","mean-squared-error","numpy"],"latest_commit_sha":null,"homepage":"","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/Yukti-09.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,"publiccode":null,"codemeta":null}},"created_at":"2021-05-16T07:14:48.000Z","updated_at":"2021-05-28T21:40:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"b625dc5d-af0f-4eff-9f73-7e7be8d66608","html_url":"https://github.com/Yukti-09/Linear-Regression","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yukti-09/Linear-Regression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukti-09%2FLinear-Regression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukti-09%2FLinear-Regression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukti-09%2FLinear-Regression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukti-09%2FLinear-Regression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukti-09","download_url":"https://codeload.github.com/Yukti-09/Linear-Regression/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukti-09%2FLinear-Regression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273272560,"owners_count":25075985,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["linear-regression","matplotlib","mean-squared-error","numpy"],"created_at":"2024-10-03T21:54:06.983Z","updated_at":"2025-10-13T11:07:51.171Z","avatar_url":"https://github.com/Yukti-09.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linear-Regression\n\nLinear regression is a linear model, e.g. a model that assumes a linear relationship between the input variables (x) and the single output variable (y). More specifically, that y can be calculated from a linear combination of the input variables (x). \u003cbr /\u003e\n\nIn this analysis, 100 random input samples have been considered with value less than 1. \u003cbr /\u003e\nA function, here, y = 3x has been considered and some randomness has been added to it. \u003cbr /\u003e\nStraight lines are of the form, y = mx + c.  \u003cbr /\u003e\nHere, we consider m to be the weights and c to be the bias added.  \u003cbr /\u003e\nTherefore, we can say, y = wx + b. \u003cbr /\u003e\n\ny = [w,b] . [x,1]\u003csup\u003eT\n\nHere, we create a new variable x_dash = [x,1]\n\nThe bias added is 1 here. \u003cbr /\u003e\n\nThe cost here is mean squared error.  \u003cbr /\u003e\nCost = Sum (y(predicted) - y(actual))\u003csup\u003e2   \u003cbr /\u003e\n  \n= Sum (wTx - y(actual))\u003csup\u003e2  \n  \nResiduals = wTx - y(actual)\nGradient vector = x * (Residuals)\n\nw(t+1) = w(t) - (Learning Rate) * (Gradient vector)\n\nThe code has been run for 100 epochs with a learning rate of 0.01.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukti-09%2Flinear-regression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukti-09%2Flinear-regression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukti-09%2Flinear-regression/lists"}