{"id":24986884,"url":"https://github.com/drsoliddevil/mlr-gd","last_synced_at":"2025-04-11T23:24:41.431Z","repository":{"id":271751556,"uuid":"914446693","full_name":"DrSolidDevil/mlr-gd","owner":"DrSolidDevil","description":"Multiple linear regression by gradient descent.","archived":false,"fork":false,"pushed_at":"2025-04-10T20:31:43.000Z","size":234,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T21:32:47.668Z","etag":null,"topics":["data-science","gradient-descent","linear-regression","machine-learning","ml","numpy","python","regression"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/mlr-gd/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrSolidDevil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-09T16:02:55.000Z","updated_at":"2025-04-10T20:31:30.000Z","dependencies_parsed_at":"2025-01-09T17:38:21.635Z","dependency_job_id":"0924edd1-db57-4a3d-bbf3-c8e71bf17090","html_url":"https://github.com/DrSolidDevil/mlr-gd","commit_stats":null,"previous_names":["drsoliddevil/mlr-gd"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSolidDevil%2Fmlr-gd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSolidDevil%2Fmlr-gd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSolidDevil%2Fmlr-gd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSolidDevil%2Fmlr-gd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrSolidDevil","download_url":"https://codeload.github.com/DrSolidDevil/mlr-gd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493777,"owners_count":21113318,"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":["data-science","gradient-descent","linear-regression","machine-learning","ml","numpy","python","regression"],"created_at":"2025-02-04T11:33:09.625Z","updated_at":"2025-04-11T23:24:41.424Z","avatar_url":"https://github.com/DrSolidDevil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e \u003cbr\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/DrSolidDevil/mlr-gd/main/logo.png\" width=\"300\"\u003e\n  \u003cbr\u003e\u003cbr\u003e\n\u003c/h1\u003e\n\n\u003cdiv id=\"badges\" align=\"center\"\u003e\n\u003ca href=\"https://github.com/DrSolidDevil/mlr-gd//releases/latest\"\u003e\u003cimg alt=\"GitHub Release\" src=\"https://img.shields.io/github/v/release/drsoliddevil/mlr-gd?label=latest%20release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/mlr-gd/\"\u003e\u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/mlr-gd?label=PyPi%20downloads\"\u003e\u003c/a\u003e\n\u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/mlr-gd\"\u003e\n\u003cimg alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/DrSolidDevil/mlr-gd\"\u003e\n\u003ca href=\"https://mlr-gd.readthedocs.io/\"\u003e\u003cimg alt=\"Read the Docs\" src=\"https://img.shields.io/readthedocs/mlr-gd\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/DrSolidDevil/mlr-gd/blob/main/LICENSE\"\u003e\u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/drsoliddevil/mlr-gd\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\nMultiple linear regression by gradient descent.\n\u003cbr\u003e\u003cbr\u003e\n\u003ch2\u003eInstallation\u003c/h2\u003e\n\nTo install mlr-gd you can use [pip](https://pip.pypa.io):\n\n```bash\n$ python -m pip install mlr-gd\n```\n\nAlternatively, you can install it by cloning the [GitHub repository](https://github.com/DrSolidDevil/mlr-gd):\n```bash\n$ git clone https://github.com/DrSolidDevil/mlr-gd.git\n$ cd mlr-gd\n$ pip install .\n```\n\n\u003cbr\u003e\n\nTo import the package into your script:  \n```python\nimport melar\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003ch2\u003eExample\u003c/h2\u003e\n\n\n```python\nimport numpy as np\nimport melar\n\n# y = x1 + 0.5*x2\nx = np.array([[1, 3, 5, 8], [1, 2, 3, 6]])\ny = np.array([1.5, 4, 6.5, 11])\n\nlearning_rate = 0.01\ngenerations = 100\n\n\nmodel = melar.LinearRegression(weights_amount=2)\nmodel.train(x, y, learning_rate, generations, do_print=True)\nprint(f\"Weights: {model.weights}, Bias: {model.bias}\")\n```\n\n\n```\nGen: 0, Cost: 95.4852602406095\nGen: 1, Cost: 5.593624864417041\nGen: 2, Cost: 0.3286224504551768\nGen: 3, Cost: 0.020244781001893267\n...\nGen: 99, Cost: 0.0007438760098695897\nTraining Complete\nWeights: [0.94643617 0.57630021], Bias: -0.003265101149422934\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrsoliddevil%2Fmlr-gd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrsoliddevil%2Fmlr-gd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrsoliddevil%2Fmlr-gd/lists"}