{"id":23029654,"url":"https://github.com/antononcube/python-regressionizer","last_synced_at":"2025-10-07T17:27:33.849Z","repository":{"id":254524925,"uuid":"844672321","full_name":"antononcube/Python-Regressionizer","owner":"antononcube","description":"Python package with a class that allows pipeline-like specification and execution of regression workflows.","archived":false,"fork":false,"pushed_at":"2024-12-07T16:10:53.000Z","size":5127,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-15T06:26:46.942Z","etag":null,"topics":["conditional-cumulative-distribution-function","cumulative-distribution-function","least-squares","monad","outlier-detection","outliers","outliers-detection","python","quantile-regression","regression","residual-plot","visualization","workflow"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/Regressionizer","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antononcube.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T18:31:36.000Z","updated_at":"2025-06-02T15:29:00.000Z","dependencies_parsed_at":"2024-12-05T04:24:15.842Z","dependency_job_id":"f76ba019-7ae1-4b5c-927f-6de97399a774","html_url":"https://github.com/antononcube/Python-Regressionizer","commit_stats":null,"previous_names":["antononcube/python-regressionizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antononcube/Python-Regressionizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FPython-Regressionizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FPython-Regressionizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FPython-Regressionizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FPython-Regressionizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antononcube","download_url":"https://codeload.github.com/antononcube/Python-Regressionizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FPython-Regressionizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278812835,"owners_count":26050401,"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-07T02:00:06.786Z","response_time":59,"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":["conditional-cumulative-distribution-function","cumulative-distribution-function","least-squares","monad","outlier-detection","outliers","outliers-detection","python","quantile-regression","regression","residual-plot","visualization","workflow"],"created_at":"2024-12-15T14:16:35.112Z","updated_at":"2025-10-07T17:27:33.833Z","avatar_url":"https://github.com/antononcube.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regressionizer\n\nPython package with a class that allows pipeline-like specification and execution of regression workflows.\n\nExtensive guide is given in the Jupyter notebook \n[\"Rapid-specification-of-regression-workflows.ipynb\"](https://github.com/antononcube/Python-Regressionizer/blob/main/docs/Rapid-specification-of-regression-workflows.ipynb) \nand the corresponding Markdown document\n[\"Rapid-specification-of-regression-workflows.md\"](https://github.com/antononcube/Python-Regressionizer/blob/main/docs/Rapid-specification-of-regression-workflows.md).\n\n------\n\n## Features summary \n\n- The class `Regressionizer` facilitates rapid specifications of regressions workflows.\n  - To quickly specify: \n    - data rescaling and summary\n    - regression computations\n    - outliers finding\n    - conditional Cumulative Distribution Functions (CDFs) reconstruction\n    - plotting of data, fits, residual errors, outliers, CDFs \n\n- `Regressionizer` works with data frames, numpy arrays, lists of numbers, and lists of numeric pairs.\n\n\n### Details and arguments\n\n- The curves computed with Quantile Regression are called **regression quantiles**.\n\n- `Regressionizer` has three regression methods:\n  - `quantile_regression`\n  - `quantile_regression_fit`\n  - `least_squares_fit`\n  \n- The regression quantiles computed with the methods `quantile_regression` and `quantile_regression_fit` \n  correspond to probabilities specified with the argument `probs`.\n\n- The method`quantile_regression` computes fits using a B-spline functions basis.  \n  - The basis is specified with the arguments `knots` and `order`.\n  - `order` is 3 by default. \n\n- The methods `quantile_regession_fit` and `least_squares_fit` use lists of basis functions to fit with \n  specified with the argument `funcs`.\n\n### Workflows flowchart\n\nThe following flowchart summarizes the workflows that are supported by `Regressionizer`:\n\n![](https://raw.githubusercontent.com/antononcube/Python-Regressionizer/main/docs/img/Quantile-regression-workflow-extended.jpg)\n\n\n------\n\n## Usage examples \n\nImport libraries:\n\n```python\nfrom Regressionizer import *\nimport numpy as np\n```\n\nGenerate random data:\n\n```python\nnp.random.seed(0)\nx = np.linspace(0, 2, 300)\ny = np.sin(2 * np.pi * x) + np.random.normal(0, 0.4, x.shape)\ndata = np.column_stack((x, y)\n```\n\nCompute quantile regression for probabilities `[0.2, 0.5, 0.8]` and make the corresponding plot:\n\n```python\nobj = (Regressionizer(data)\n       .quantile_regression(knots=8, probs=[0.2, 0.5, 0.8])\n       .plot(title=\"B-splines fit\", template=\"plotly\")\n       )\n```\n\nShow the plot obtained above:\n\n```python\nobj.take_value().show()\n```\n\n![](https://raw.githubusercontent.com/antononcube/Python-Regressionizer/main/docs/img/random-data-B-spline-rqs.png)\n\n------\n\n## References\n\n### Articles, books\n\n[RK1] Roger Koenker, \n[Quantile Regression](https://books.google.com/books/about/Quantile_Regression.html?id=hdkt7V4NXsgC), \nCambridge University Press, 2005.\n\n[RK2] Roger Koenker,\n[\"Quantile Regression in R: a vignette\"](https://cran.r-project.org/web/packages/quantreg/vignettes/rq.pdf),\n(2006),\n[CRAN](https://cran.r-project.org/).\n\n[AA1] Anton Antonov,\n[\"A monad for Quantile Regression workflows\"](https://github.com/antononcube/MathematicaForPrediction/blob/master/MarkdownDocuments/A-monad-for-Quantile-Regression-workflows.md),\n(2018),\n[MathematicaForPrediction at GitHub](https://github.com/antononcube/MathematicaForPrediction).\n\n### Packages, paclets\n\n[RKp1] Roger Koenker,\n[`quantreg`](https://cran.r-project.org/web/packages/quantreg/index.html),\n[CRAN](https://cran.r-project.org/).\n\n[AAp1] Anton Antonov,\n[Quantile Regression WL paclet](https://github.com/antononcube/WL-QuantileRegression-paclet),\n(2014-2023),\n[GitHub/antononcube](https://github.com/antononcube).\n\n[AAp2] Anton Antonov,\n[Monadic Quantile Regression WL paclet](https://github.com/antononcube/WL-MonadicQuantileRegression-paclet),\n(2018-2024),\n[GitHub/antononcube](https://github.com/antononcube).\n\n[AAp3] Anton Antonov,\n[`QuantileRegression`](https://resources.wolframcloud.com/FunctionRepository/resources/QuantileRegression),\n(2019),\n[Wolfram Function Repository](https://resources.wolframcloud.com/FunctionRepository/resources/QuantileRegression).\n\n### Repositories\n\n[AAr1] Anton Antonov,\n[DSL::English::QuantileRegressionWorkflows in Raku](https://github.com/antononcube/Raku-DSL-English-QuantileRegressionWorkflows),\n(2020),\n[GitHub/antononcube](https://github.com/antononcube/Raku-DSL-English-QuantileRegressionWorkflows).\n\n### Videos\n\n[AAv1] Anton Antonov,\n[\"Boston useR! QuantileRegression Workflows 2019-04-18\"](https://www.youtube.com/watch?v=a_Dk25xarvE),\n(2019),\n[Anton Antonov at YouTube](https://www.youtube.com/@AAA4Prediction).\n\n[AAv2] Anton Antonov,\n[\"useR! 2020: How to simplify Machine Learning workflows specifications\"](https://www.youtube.com/watch?v=b9Uu7gRF5KY),\n(2020),\n[R Consortium at YouTube](https://www.youtube.com/channel/UC_R5smHVXRYGhZYDJsnXTwg).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fpython-regressionizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantononcube%2Fpython-regressionizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fpython-regressionizer/lists"}