wwu-mmll / photonai

PHOTONAI is a high level python API for designing and optimizing machine learning pipelines.
https://photon-ai.com/
GNU General Public License v3.0
74 stars 14 forks source link

AttributeError: module 'sklearn.metrics._dist_metrics' has no attribute 'DatasetsPair' #69

Closed michaelkalz closed 2 weeks ago

michaelkalz commented 1 year ago

AttributeError: module 'sklearn.metrics._dist_metrics' has no attribute 'DatasetsPair' seems to occur when using imbalanced-learn>0.9.1. It took quite some time to find this "workaround" based on this as photonai asks for scikit-learn==1.1.3 and simply downgrading it to scikit-learn==1.1.0 (as suggested) did not work at all.

jernsting commented 1 year ago

Please provide a minimal code example where the error occurs. Have you found a workaround that actually works?

michaelkalz commented 1 year ago

It occurred during the import part from here from sklearn.model_selection import ShuffleSplit, KFold from sklearn.datasets import load_breast_cancer from photonai.base import Hyperpipe, PipelineElement, Switch from photonai.optimization import IntegerRange, FloatRange

Downgrading imbalanced-learn==0.9.1 worked

jernsting commented 1 year ago

Which version of photonai is used? Please update to photonai 2.3.0