{"id":34082443,"url":"https://github.com/jtreeves/regressions_library","last_synced_at":"2026-03-17T20:16:43.064Z","repository":{"id":46611247,"uuid":"330336240","full_name":"jtreeves/regressions_library","owner":"jtreeves","description":"A collection of algorithms for fitting data to different functional models by using matrices and machine learning","archived":false,"fork":false,"pushed_at":"2022-06-16T05:47:22.000Z","size":3721,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T18:23:24.098Z","etag":null,"topics":["algorithms","data-science","machine-learning","python","regression"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jtreeves.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}},"created_at":"2021-01-17T07:18:55.000Z","updated_at":"2024-12-08T09:25:03.000Z","dependencies_parsed_at":"2022-07-21T05:18:14.958Z","dependency_job_id":null,"html_url":"https://github.com/jtreeves/regressions_library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jtreeves/regressions_library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fregressions_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fregressions_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fregressions_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fregressions_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtreeves","download_url":"https://codeload.github.com/jtreeves/regressions_library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fregressions_library/sbom","scorecard":{"id":540188,"data":{"date":"2025-08-11","repo":{"name":"github.com/jtreeves/regressions_library","commit":"f9e722e2644173012aaa5efe2327f7c008944480"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T08:01:38.355Z","repository_id":46611247,"created_at":"2025-08-20T08:01:38.355Z","updated_at":"2025-08-20T08:01:38.355Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30630417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algorithms","data-science","machine-learning","python","regression"],"created_at":"2025-12-14T12:16:17.497Z","updated_at":"2026-03-17T20:16:43.054Z","avatar_url":"https://github.com/jtreeves.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regressions Library\n\nThe regressions library is a collection of Python algorithms for fitting data to different functional models by using linear algebra and machine learning. It can generate the following eight key regression models based on any data set: linear, quadratic, cubic, hyperbolic, exponential, logarithmic, logistic, and sinusoidal. For each model, it outputs the constants of the equation, notable graphical points, and the correlation coefficient, among other useful details. It is publicly available for download on the Python Package Index (PyPI), and its complete documentation is hosted on Read the Docs. To learn more about downloading the library, view its [PyPI page](https://pypi.org/project/regressions/). To learn more about how to use it, view its [documentation](https://regressions.readthedocs.io/en/latest/).\n\n**Contents**\n1. [Requirements](https://github.com/jtreeves/regressions_library#requirements)\n2. [Installation](https://github.com/jtreeves/regressions_library#installation)\n3. [Features](https://github.com/jtreeves/regressions_library#features)\n4. [Code Examples](https://github.com/jtreeves/regressions_library#code-examples)\n5. [Future Goals](https://github.com/jtreeves/regressions_library#future-goals)\n\n## Requirements\n\n- Python 3.8 or higher\n- NumPy\n- SciPy\n\n## Installation\n\n**Download Library**\n```\npip3 install regressions\n```\n\n**Create Local Repository**\n```\ngit clone https://github.com/jtreeves/regressions_library.git\n```\n\n## Features\n\n- Regression models for eight key types of functions\n    - Linear\n    - Quadratic\n    - Cubic\n    - Hyperbolic\n    - Exponential\n    - Logarithmic\n    - Logistic\n    - Sinusoidal\n- Correlation coefficients for each regression model generated\n- List of key points associated with each regression model generated\n    - Roots\n    - Extrema\n    - Inflection points\n- Systems solved using linear algebra and machine learning\n- Extensive documentation for various use cases\n- 1445 test cases to ensure accuracy of results\n- Error handling to stop users from inputting improper argument types and circumvent issues like division by zero\n\n## Code Examples\n\n**Linear Regression Model**\n```python\ndef linear_model(data, precision = 4):\n    independent_variable = single_dimension(data, 1)\n    dependent_variable = single_dimension(data, 2)\n    independent_matrix = []\n    dependent_matrix = column_conversion(dependent_variable)\n    for element in independent_variable:\n        independent_matrix.append([element, 1])\n    solution = system_solution(independent_matrix, dependent_matrix, precision)\n    coefficients = no_zeroes(solution, precision)\n    equation = linear_equation(*coefficients, precision)\n    derivative = linear_derivatives(*coefficients, precision)['first']['evaluation']\n    integral = linear_integral(*coefficients, precision)['evaluation']\n    points = key_coordinates('linear', coefficients, precision)\n    five_numbers = five_number_summary(independent_variable, precision)\n    min_value = five_numbers['minimum']\n    max_value = five_numbers['maximum']\n    q1 = five_numbers['q1']\n    q3 = five_numbers['q3']\n    accumulated_range = accumulated_area('linear', coefficients, min_value, max_value, precision)\n    accumulated_iqr = accumulated_area('linear', coefficients, q1, q3, precision)\n    averages_range = average_values('linear', coefficients, min_value, max_value, precision)\n    averages_iqr = average_values('linear', coefficients, q1, q3, precision)\n    predicted = []\n    for element in independent_variable:\n        predicted.append(equation(element))\n    accuracy = correlation_coefficient(dependent_variable, predicted, precision)\n    evaluations = {\n        'equation': equation,\n        'derivative': derivative,\n        'integral': integral\n    }\n    points = {\n        'roots': points['roots'],\n        'maxima': points['maxima'],\n        'minima': points['minima'],\n        'inflections': points['inflections']\n    }\n    accumulations = {\n        'range': accumulated_range,\n        'iqr': accumulated_iqr\n    }\n    averages = {\n        'range': averages_range,\n        'iqr': averages_iqr\n    }\n    result = {\n        'constants': coefficients,\n        'evaluations': evaluations,\n        'points': points,\n        'accumulations': accumulations,\n        'averages': averages,\n        'correlation': accuracy\n    }\n    return result\n```\n\n**Correlation Coefficient**\n```python\ndef correlation_coefficient(actuals, expecteds, precision = 4):\n    residuals = multiple_residuals(actuals, expecteds)\n    deviations = multiple_deviations(actuals)\n    squared_residuals = []\n    for residual in residuals:\n        squared_residuals.append(residual**2)\n    squared_deviations = []\n    for deviation in deviations:\n        squared_deviations.append(deviation**2)\n    residual_sum = sum_value(squared_residuals)\n    deviation_sum = sum_value(squared_deviations)\n    if deviation_sum == 0:\n        deviation_sum = 10**(-precision)\n    ratio = residual_sum / deviation_sum\n    if ratio \u003e 1:\n        return 0.0\n    else:\n        result = (1 - ratio)**(1/2)\n        return rounded_value(result, precision)\n```\n\n## Future Goals\n\n- Increase precision of results\n- Include more types of regression models in results\n- Include more graphical analysis in results","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtreeves%2Fregressions_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtreeves%2Fregressions_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtreeves%2Fregressions_library/lists"}