We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Overflow Runtime Warning for Numpy Logistic Function in CalibratedClassifierCV with SVM
Training a soft-margin SVM inside a CalibrationClassifierCV using sigmoid (Platt) scaling. Below is the definition of the classifier:
CalibrationClassifierCV
g_svm = svm.SVC(gamma='auto') g = CalibratedClassifierCV(g_svm, method='sigmoid', cv=10)
I am not able to share the dataset publicly. I could try to create a synthetic one if it is useful/needed. The warning is intermittent.
No runtime warning is reported.
/sklearn/calibration.py:520: RuntimeWarning: overflow encountered in exp return 1. / (1. + np.exp(self.a_ * T + self.b_))
System: python: 3.7.1 (default, Dec 12 2018, 01:02:44) [Clang 10.0.0 (clang-1000.11.45.5)] executable: machine: Darwin-18.2.0-x86_64-i386-64bit
BLAS: macros: NO_ATLAS_INFO=3, HAVE_CBLAS=None lib_dirs: cblas_libs: cblas
Python deps: pip: 18.1 setuptools: 39.0.1 sklearn: 0.20.1 numpy: 1.15.4 scipy: 1.1.0 Cython: None pandas: 0.23.4
The text was updated successfully, but these errors were encountered:
Changing the function to use expit worked on my personal test case. If you would like a pull-request raised, I can do so.
expit
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Description
Overflow Runtime Warning for Numpy Logistic Function in CalibratedClassifierCV with SVM
Steps/Code to Reproduce
Training a soft-margin SVM inside a
CalibrationClassifierCV
using sigmoid (Platt) scaling. Below is the definition of the classifier:g_svm = svm.SVC(gamma='auto') g = CalibratedClassifierCV(g_svm, method='sigmoid', cv=10)
I am not able to share the dataset publicly. I could try to create a synthetic one if it is useful/needed. The warning is intermittent.
Expected Results
No runtime warning is reported.
Actual Results
/sklearn/calibration.py:520: RuntimeWarning: overflow encountered in exp
return 1. / (1. + np.exp(self.a_ * T + self.b_))
Versions
System:
python: 3.7.1 (default, Dec 12 2018, 01:02:44) [Clang 10.0.0 (clang-1000.11.45.5)]
executable:
machine: Darwin-18.2.0-x86_64-i386-64bit
BLAS:
macros: NO_ATLAS_INFO=3, HAVE_CBLAS=None
lib_dirs:
cblas_libs: cblas
Python deps:
pip: 18.1
setuptools: 39.0.1
sklearn: 0.20.1
numpy: 1.15.4
scipy: 1.1.0
Cython: None
pandas: 0.23.4
The text was updated successfully, but these errors were encountered: