Closed MuellerSeb closed 4 years ago
Yes, we should switch to inspect.signature
,
>>> from sklearn.model_selection import GridSearchCV
>>> import inspect
>>> est_sign = inspect.signature(GridSearchCV)
>>> 'return_train_score' in est_sign.parameters
True
@rth: Cool! Could you come up with a PR?
https://github.com/GeoStat-Framework/PyKrige/blob/1a889a7f087ac7c3e852f6e48601f4a60efca260/pykrige/compat.py#L14
This line is not working with the newest version of sklearn, resulting in a missing
mean_train_score
.I think, this is because they implemented keyword-only arguments there: https://github.com/scikit-learn/scikit-learn/blob/fd237278e895b42abe8d8d09105cbb82dc2cbba7/sklearn/model_selection/_search.py#L1174