scikit-learn-contrib / skope-rules

machine learning with logical rules in Python
http://skope-rules.readthedocs.io
Other
599 stars 96 forks source link

issue in mask indexing #38

Closed stat17-hb closed 3 years ago

stat17-hb commented 4 years ago

Hi, thank you for sharing this great package.

However, I think I might find a mistake in the mask indexing.

mask = ~samples

samples is numpy array, and when you put ~, you can get -(value+1).

ex. samples = np.array([1,2,3,4]) ~samples [-2, -3, -4, -5]

please check this issue.

Thanks!

ngoix commented 4 years ago

thanks for noticing this, which happened after this change on sklearn https://github.com/scikit-learn/scikit-learn/pull/9723