Find threshold for fine-tuning output from predict_proba
Project description
Thresher - THRESHold EvaluatoR
Project description
How to setup?
The process is rather straightforward, you just need to just whether to install from the sources (latest revision), or from the PyPI repository (stable release).
Requirements
Tested with Python 3.7+
, on a standard Unix environment
Installation
Installation from source:
pip install git+https://github.com/oskar-j/thresher.git
Stable release using the pip
tool:
pip install thresher
Sample usage
import thresher
t = thresher.Thresher()
print('Currently supported algorithms:')
print(t.get_supported_algorithms())
cases = [0.1, 0.3, 0.4, 0.7]
actual_labels = [-1, -1, 1, 1]
print(f'Optimization result: {t.optimize_threshold(cases, actual_labels)}')
Future work
- adding more algorithms
- publishing on conda
- more heavy test loads
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thresher-py-0.1.0.tar.gz
(6.9 kB
view hashes)