Skip to main content

confidence_interval_estimator_ML

This repo contains code to perform estimation of Confidence Intervals both parametric and non-parametric (a.k.a. Monte Carlo Confidence Interval or Empirical Confidence Interval estimation) for Machine Learing models.

Colab Demo

You can easily try this tool in Google Colab by clicking on the following badge: Open In Colab

Quickstart

>>> import confidence_interval_estimator_ML.utils as cie
>>> # Parametric Estimation:
>>> cie.parametric_confidence_interval(confidence_level=.95, mean=model_accuracy, sample_size=sample_size, verbose=True)
Computing C.I. assuming the data follow a standard normal distribution
With 95.0% confidence the accuracy of the model is in 0.977 +/-0.023.
(0.9773132867658845, 0.02268671323411553)

>>> # Non-Parametric Estimation:
>>> test_accuracies = cie.get_accuracy_on_samples(get_classifier_instance, X, y, n_iterations=100, sample_ratio=1,
                             train_ratio=0.8, random_seed=None, sample_with_replacement=True, verbose=False) 

>>> cie.nonparametric_confidence_interval(accs, .9)
From the given data, with 90.0% confidence the accuracy of the model is in 0.959 +/-4.05.
(0.9595, 0.04050000000000009)

Further Details

You can find further details on the usage of the tool in the code documentation or in the examples provided in the Notebook.ipynb file. If you need help, please don't hesitate to open a github issue or getting in touch.

Metadata

Release files for confidence-interval-estimator-ML 0.1.2

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

Source distribution (sdist)

Source distribution for confidence-interval-estimator-ML 0.1.2
File Size Uploaded
confidence_interval_estimator_ML-0.1.2.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for confidence-interval-estimator-ML 0.1.2
File Interpreter ABI Platform
confidence_interval_estimator_ML-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / confidence_interval_estimator_ML-0.1.2.tar.gz

Download URL confidence_interval_estimator_ML-0.1.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b7764a5e4c9eaf7278bfe3dfe7820378c3db8cec7fa15fe470e578fd9d8ff2e3
BLAKE2b-256 checksum
How to use checksums
6e2a83843fdf4237f147648310aac7b22378979eb89a6ef859e453fe521cc885
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.8

Release files / confidence_interval_estimator_ML-0.1.2-py3-none-any.whl

Download URL confidence_interval_estimator_ML-0.1.2-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e2596e3d84dcb8416fad883b1a96c22530e0464f484f51ec28ff1a79dc7e887
BLAKE2b-256 checksum
How to use checksums
1ab196178263058f76868bc865b746c44b7d3ea88fd965a46899dcf95482fe3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

1 release file

0.1

1 release file

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