{"id":32175514,"url":"https://github.com/brendanartley/regressio","last_synced_at":"2025-10-21T19:40:45.577Z","repository":{"id":48326493,"uuid":"514348048","full_name":"brendanartley/Regressio","owner":"brendanartley","description":"A python library for univariate regression, interpolation, and smoothing.","archived":false,"fork":false,"pushed_at":"2023-05-12T16:00:10.000Z","size":961,"stargazers_count":342,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-01T20:37:11.002Z","etag":null,"topics":["interpolation","python","regression","smoothing","time-series"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brendanartley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-15T17:14:18.000Z","updated_at":"2024-12-30T22:27:08.000Z","dependencies_parsed_at":"2024-01-17T06:09:48.895Z","dependency_job_id":"6b65bb8b-979b-4e5a-8715-a5f9e2fdfff7","html_url":"https://github.com/brendanartley/Regressio","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brendanartley/Regressio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanartley%2FRegressio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanartley%2FRegressio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanartley%2FRegressio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanartley%2FRegressio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brendanartley","download_url":"https://codeload.github.com/brendanartley/Regressio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanartley%2FRegressio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325221,"owners_count":26311414,"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-10-21T02:00:06.614Z","response_time":58,"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":["interpolation","python","regression","smoothing","time-series"],"created_at":"2025-10-21T19:40:43.989Z","updated_at":"2025-10-21T19:40:45.572Z","avatar_url":"https://github.com/brendanartley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://github.com/brendanartley/Regressio/blob/main/imgs/logo.svg?raw=true\" width=\"300\"\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/regressio/\" alt=\"PYPI\"\u003e\n        \u003cimg src=\"https://img.shields.io/pypi/v/regressio\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/brendanartley/Regressio/blob/main/License\" alt=\"MIT License\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/brendanartley/regressio\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/brendanartley/Regressio/issues\" alt=\"Issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/brendanartley/regressio\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/brendanartley/Regressio\" alt=\"Stars\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/stars/brendanartley/regressio?style=social\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nRegressio is a python module for univariate regression, interpolation, and smoothing.\n\nThe available models are:\n- Linear regression\n- Ridge regression\n- Linear spline\n- Isotonic regression\n- Bin regression\n- Cubic spline\n- Natural cubic spline\n- Exponential moving average\n- Kernel functions (Gaussian, KNN, Weighted average)\n\nThere are also functions implemented to generate data samples.\n\nThe available data generators are:\n- Random walk\n- Isotonic sample\n\n## Installation\n\nRegressio is supported in Python 3.8+ and requires only NumPy and Matplotlib.\n\n```python\npip install regressio --upgrade\n```\nor\n```python\npip install git+https://github.com/brendanartley/Regressio\n```\n\n## Example Usage\n\nCubic spline. \n\n```python\n# Import modules + classes\nfrom regressio.models import cubic_spline\nfrom regressio.datagen import generate_random_walk\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Set figsize and seed\nplt.rcParams['figure.figsize'] = (10, 5)\nnp.random.seed(0)\n\n# Generate data sample\nx, y = generate_random_walk(150)\n\n# Fit model and plot result\nmodel = cubic_spline(pieces=15)\nmodel.fit(x, y, plot=True, confidence_interval=0.99)\n```\n\u003cimg alt=\"Cubic spline\" src=\"https://github.com/brendanartley/Regressio/blob/main/imgs/cubic_spline.png?raw=true\" width=\"650\"\u003e\n\nLinear regression.\n\n```python\n# Import modules + classes\nfrom regressio.models import linear_regression\nfrom regressio.datagen import generate_random_walk\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Set figsize and seed\nplt.rcParams['figure.figsize'] = (10, 5)\nnp.random.seed(1)\n\n# Generate data sample\nx, y = generate_random_walk(100)\n\n# Fit model and plot result\nmodel = linear_regression(degree=5)\nmodel.fit(x, y, plot=True, confidence_interval=0.95)\n```\n\u003cimg alt=\"Linear regression\" src=\"https://github.com/brendanartley/Regressio/blob/main/imgs/linear_regression.png?raw=true\" width=\"650\"\u003e\n\nExponential moving average.\n\n```python\n# Import modules + classes\nfrom regressio.models import exp_moving_average\nfrom regressio.datagen import generate_isotonic_sample\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Set figsize and seed\nplt.rcParams['figure.figsize'] = (10, 5)\nnp.random.seed(6)\n\n# Generate data sample\nx, y = generate_isotonic_sample(100)\n\n# Fit model and plot result\nmodel = exp_moving_average(alpha=0.2)\nmodel.fit(x, y, plot=True, confidence_interval=0.90)\n```\n\u003cimg alt=\"Exponential moving average\" src=\"https://github.com/brendanartley/Regressio/blob/main/imgs/exponential_smoother.png?raw=true\" width=\"650\"\u003e\n\nFor more examples, navigate to the [examples.ipynb](https://github.com/brendanartley/Regressio/blob/main/examples.ipynb) file in this repository.\n\n## Contributions\n\nWe welcome all to contribute their expertise to the Regressio library. If you are new to open source contributions, [this guide](https://opensource.guide/how-to-contribute/) gives some great tips on how to get started.\n\nIf you have a complex feature in mind or find a large bug in the code, please create a detailed issue and we will get to work on it.\n\n## References\n\n- Hyndman, R.J., \u0026 Athanasopoulos, G. (2021) Forecasting: principles and practice, 3rd edition, OTexts: Melbourne, Australia. OTexts.com/fpp3. Accessed July 2022. \n\n- Kong, Qingkai, et al. Python Programming and Numerical Methods: A Guide for Engineers and Scientists. Academic Press, an Imprint of Elsevier, pythonnumericalmethods.berkeley.edu, Accessed July 2022. \n\n- Li, Bao, (2022). Stat 508: Applied Data Mining, Statistical Learning: Stat Online. PennState: Statistics Online Courses, online.stat.psu.edu/stat508, Accessed July 2022.\n\n- Brett, M. (2014, October 26). An introduction to smoothing. Tutorials on imaging, computing and mathematics. matthew-brett.github.io/teaching, Accessed July 2022.\n\n## BibText\n\n```\n@misc{Regressio,\n      title={Regressio: A python module for univariate regression, interpolation, and smoothing}, \n      author={Brendan Artley},\n      year={2022},\n      publisher={GitHub},\n      journal={GitHub repository},\n      Howpublished = {\\url{https://github.com/brendanartley/Regressio}}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanartley%2Fregressio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrendanartley%2Fregressio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanartley%2Fregressio/lists"}