{"id":15359275,"url":"https://github.com/cjekel/tolerance_interval_py","last_synced_at":"2025-06-23T00:04:50.181Z","repository":{"id":35802062,"uuid":"212443895","full_name":"cjekel/tolerance_interval_py","owner":"cjekel","description":"A small Python library for one-sided tolerance bounds and two-sided tolerance intervals.","archived":false,"fork":false,"pushed_at":"2023-03-27T19:29:12.000Z","size":148,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T20:17:13.534Z","etag":null,"topics":[],"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/cjekel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2019-10-02T21:22:48.000Z","updated_at":"2025-03-17T16:14:35.000Z","dependencies_parsed_at":"2025-04-15T07:34:30.306Z","dependency_job_id":"78d870c3-1146-4e7c-b5cb-d36ab1b141fe","html_url":"https://github.com/cjekel/tolerance_interval_py","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cjekel/tolerance_interval_py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjekel%2Ftolerance_interval_py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjekel%2Ftolerance_interval_py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjekel%2Ftolerance_interval_py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjekel%2Ftolerance_interval_py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjekel","download_url":"https://codeload.github.com/cjekel/tolerance_interval_py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjekel%2Ftolerance_interval_py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261386724,"owners_count":23150869,"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":[],"created_at":"2024-10-01T12:44:20.707Z","updated_at":"2025-06-23T00:04:45.129Z","avatar_url":"https://github.com/cjekel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n### toleranceinterval\n\nA small Python library for one-sided tolerance bounds and two-sided tolerance intervals.\n\n[![Build Status](https://travis-ci.com/cjekel/tolerance_interval_py.svg?branch=master)](https://travis-ci.com/cjekel/tolerance_interval_py) [![codecov](https://codecov.io/gh/cjekel/tolerance_interval_py/branch/master/graph/badge.svg?token=K7JGW0PXHU)](https://codecov.io/gh/cjekel/tolerance_interval_py)\n\n# Methods\n\nCheckout the [documentation](https://jekel.me/tolerance_interval_py/index.html). This is what has been implemented so far:\n\n## twoside\n\n- normal\n- normal_factor\n- lognormal\n\n## oneside\n\n- normal\n- lognormal\n- non_parametric\n- hanson_koopmans\n- hanson_koopmans_cmh\n\n# Requirements\n\n```Python\n\"numpy \u003e= 1.14.0\"\n\"scipy \u003e= 0.19.0\"\n\"sympy \u003e= 1.4\"\n\"setuptools \u003e= 38.6.0\"\n```\n# Installation\n\n```\npython -m pip install toleranceinterval\n```\n\nor clone  and install from source\n\n```\ngit clone https://github.com/cjekel/tolerance_interval_py\npython -m pip install ./tolerance_interval_py\n```\n\n# Examples\n\nThe syntax follows ```(x, p, g)```, where ```x``` is the random sample, ```p``` is the percentile, and ```g``` is the confidence level. Here ```x``` can be a single set of random samples, or sets of random samples of the same size.\n\nEstimate the 10th percentile to 95% confidence, of a random sample ```x``` using the Hanson and Koopmans 1964 method.\n\n```python\nimport numpy as np\nimport toleranceinterval as ti\nx = np.random.random(100)\nbound = ti.oneside.hanson_koopmans(x, 0.1, 0.95)\nprint(bound)\n```\n\nEstimate the central 90th percentile to 95% confidence, of a random sample ```x``` assuming ```x``` follows a Normal distribution.\n\n```python\nimport numpy as np\nimport toleranceinterval as ti\nx = np.random.random(100)\nbound = ti.twoside.normal(x, 0.9, 0.95)\nprint('Lower bound:', bound[:, 0])\nprint('Upper bound:', bound[:, 1])\n```\n\nAll methods will allow you to specify sets of samples as 2-D numpy arrays. The caveat here is that each set must be the same size. This example estimates the 95th percentile to 90% confidence using the non-parametric method. Here ```x``` will be 7 random sample sets, where each set is of 500 random samples.\n\n```python\nimport numpy as np\nimport toleranceinterval as ti\nx = np.random.random((7, 500))\nbound = ti.oneside.non_parametric(x, 0.95, 0.9)\n# here bound will print for each set of n=500 samples \nprint('Bounds:', bound)\n```\n\n# Changelog\n\nChanges will be stored in [CHANGELOG.md](https://github.com/cjekel/tolerance_interval_py/blob/master/CHANGELOG.md).\n\n# Contributing\n\nAll contributions are welcome! Please let me know if you have any questions, or run into any issues.\n\n# License\n\nMIT License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjekel%2Ftolerance_interval_py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjekel%2Ftolerance_interval_py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjekel%2Ftolerance_interval_py/lists"}