Skip to main content

Installation

pip install threshold-finder

Usage

Folowing display an usage example.

>>> from threshold_finder.finder import OptimalThresholdFinder, ThresholdFinder, YoudenThresholdFinder
>>> # Example data
>>> true_label = pd.Series([1,1,1,0,0,0])
>>> predicted_proba = pd.Series([0.9, 0.8, 0.7, 0.72, 0.6, 0.5])

>>> # Use a specific finder directly ...
>>> finder = YoudenThresholdFinder()
>>> optimal_threshold = finder.optimal_threshold(true_label, predicted_proba)
>>> print(optimal_threshold)
0.7

>>> # ... Or use the factory
>>> factory = ThresholdFinder()
>>> finder = factory.get_finder(method="youden_statistic")
>>> optimal_threshold = finder.optimal_threshold(true_label, predicted_proba)
>>> print(optimal_threshold)
0.7

Metadata

Release files for threshold-finder 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for threshold-finder 0.1.4
File Size Uploaded Provenance Actions
threshold-finder-0.1.4.tar.gz 1.9 kB Without provenance Details for threshold-finder-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for threshold-finder 0.1.4
File Interpreter ABI Platform Actions
threshold_finder-0.1.4-py3-none-any.whl Python 3 none any Details for threshold_finder-0.1.4-py3-none-any.whl

Total release size: 4.0 kB

Release files / threshold-finder-0.1.4.tar.gz

Download URL threshold-finder-0.1.4.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
94aad3133dd57bca8d8acd5759d6d3172d0c5cfc4831c884698d7427f58a052e
BLAKE2b-256 checksum
How to use checksums
2b29a2dde6925aae38a1d4e90e81c7b64cdbeae78fa08dbd625bce728a0dc6eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-1021-azure

Release files / threshold_finder-0.1.4-py3-none-any.whl

Download URL threshold_finder-0.1.4-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef363552324e2e2cb0b0e55e30054978c344abdc8dc834bde01a7a1de962421a
BLAKE2b-256 checksum
How to use checksums
020eacfb1d5073e74309ea7969d532257140a0801301bfa9be3f50faab626813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-1021-azure

Security for threshold-finder 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page