scikit-learn-contrib / py-earth

A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines
http://contrib.scikit-learn.org/py-earth/
BSD 3-Clause "New" or "Revised" License
458 stars 121 forks source link

Fit() function throwing a TypeError #215

Open NikhilVeeresh opened 3 years ago

NikhilVeeresh commented 3 years ago

Package version i am using:

Name: sklearn-contrib-py-earth Version: 0.1.0

Here's the call trace from where the issue is originating.

File "C:\Users\NikhilVeeresh\anaconda3\envs\KP-2269-Formula\lib\site-packages\sklearn\cluster_kmeans.py", line 1035, in fit self._check_params(X) File "C:\Users\NikhilVeeresh\anaconda3\envs\KP-2269-Formula\lib\site-packages\sklearn\cluster_kmeans.py", line 943, in _check_params self._n_threads = _openmp_effective_n_threads(self._n_threads) File "sklearn\utils_openmp_helpers.pyx", line 18, in sklearn.utils._openmp_helpers._openmp_effective_n_threads File "sklearn\utils_openmp_helpers.pyx", line 54, in sklearn.utils._openmp_helpers._openmp_effective_n_threads TypeError: '<' not supported between instances of 'tuple' and 'int'

kevin-dietz commented 3 years ago

@NikhilVeeresh this error looks to be related to scikit-learn (specifically with kmeans) and not pyearth.

NikhilVeeresh commented 3 years ago

@kevin-dietz - I guess i resolved it. I had to pass a non-tuple as the parameters to the function and it worked.