{"id":15911922,"url":"https://github.com/ulf1/numpy-linreg","last_synced_at":"2026-05-19T10:36:39.108Z","repository":{"id":47315340,"uuid":"249490657","full_name":"ulf1/numpy-linreg","owner":"ulf1","description":"Linear Regression with numpy only.","archived":false,"fork":false,"pushed_at":"2021-09-03T08:38:48.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-16T09:43:28.583Z","etag":null,"topics":["linear-regression","numpy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ulf1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["ulf1"],"patreon":"ulfhamster","ko_fi":"ulfhamster"}},"created_at":"2020-03-23T16:55:00.000Z","updated_at":"2021-09-03T08:38:32.000Z","dependencies_parsed_at":"2022-09-05T14:00:10.825Z","dependency_job_id":null,"html_url":"https://github.com/ulf1/numpy-linreg","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ulf1/numpy-linreg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulf1%2Fnumpy-linreg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulf1%2Fnumpy-linreg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulf1%2Fnumpy-linreg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulf1%2Fnumpy-linreg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ulf1","download_url":"https://codeload.github.com/ulf1/numpy-linreg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulf1%2Fnumpy-linreg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266263057,"owners_count":23901356,"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":["linear-regression","numpy"],"created_at":"2024-10-06T16:01:20.124Z","updated_at":"2026-05-19T10:36:39.078Z","avatar_url":"https://github.com/ulf1.png","language":"Python","funding_links":["https://github.com/sponsors/ulf1","https://patreon.com/ulfhamster","https://ko-fi.com/ulfhamster"],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/numpy-linreg.svg)](https://badge.fury.io/py/numpy-linreg)\n[![numpy-linreg](https://snyk.io/advisor/python/numpy-linreg/badge.svg)](https://snyk.io/advisor/python/numpy-linreg)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/ulf1/numpy-linreg.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/ulf1/numpy-linreg/alerts/)\n[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/ulf1/numpy-linreg.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/ulf1/numpy-linreg/context:python)\n\n# numpy-linreg\nLinear Regression with numpy only.\n\n\n## Installation\nThe `numpy-linreg` [git repo](http://github.com/ulf1/numpy-linreg) is available as [PyPi package](https://pypi.org/project/numpy-linreg)\n\n```sh\npip install numpy-linreg\npip install git+ssh://git@github.com/ulf1/numpy-linreg.git\n```\n\n\n## Usage\nRidge Regression\n\n```py\nimport numpy_linreg.ridge as ridge\nimport numpy_linreg.metrics as metrics\nbeta = ridge.lu(y, X)\nrmse = metrics.rmse(y, X, beta)\n```\n\nOLS Regression\n\n```py\nimport numpy_linreg.ols as ols\nbeta = ols.lu(y, X)\nbeta = ols.pinv(y, X)\nbeta = ols.qr(y, X)\nbeta = ols.svd(y, X)\n```\n\nCheck the [examples](http://github.com/ulf1/numpy-linreg/tree/master/examples) folder for notebooks.\n\n\n## Appendix\n\n### Commands\nInstall a virtual environment\n\n```sh\npython3.6 -m venv .venv\nsource .venv/bin/activate\npip3 install --upgrade pip\npip3 install -r requirements.txt\npip3 install -r requirements-dev.txt\npip3 install -r requirements-demo.txt\n```\n\n(If your git repo is stored in a folder with whitespaces, then don't use the subfolder `.venv`. Use an absolute path without whitespaces.)\n\n### Python commands\n\n* Jupyter for the examples: `jupyter lab`\n* Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')`\n\nPublish\n\n```sh\npandoc README.md --from markdown --to rst -s -o README.rst\npython setup.py sdist \ntwine upload -r pypi dist/*\n```\n\n### Clean up \n\n```\nfind . -type f -name \"*.pyc\" | xargs rm\nfind . -type d -name \"__pycache__\" | xargs rm -r\nrm -r .pytest_cache\nrm -r .venv\n```\n\n### Support\nPlease [open an issue](https://github.com/ulf1/numpy-linreg/issues/new) for support.\n\n### Contributing\nPlease contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/ulf1/numpy-linreg/compare/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulf1%2Fnumpy-linreg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulf1%2Fnumpy-linreg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulf1%2Fnumpy-linreg/lists"}