Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Optimal Threshold #577

Open
sepandhaghighi opened this issue Dec 13, 2024 · 0 comments
Open

[Feature]: Optimal Threshold #577

sepandhaghighi opened this issue Dec 13, 2024 · 0 comments
Labels
enhancement New feature or request new feature

Comments

@sepandhaghighi
Copy link
Owner

Describe the feature you want to add

Support curves optimal threshold.

Describe your proposed solution

>>> import numpy
>>> from pycm import ROCCurve
>>> crv = ROCCurve(
    actual_vector=numpy.array([1, 1, 2, 2]),
    probs=numpy.array([[0.1, 0.9], [0.4, 0.6], [0.35, 0.65], [0.8, 0.2]]),
    classes=[2, 1])
>>> crv.optimal_threshold
0.5

Describe alternatives you've considered, if relevant

No response

Additional context

No response

@sepandhaghighi sepandhaghighi added enhancement New feature or request new feature labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature
Projects
None yet
Development

No branches or pull requests

1 participant