From cc9e5186e008197589318d64f94263b904af1bb5 Mon Sep 17 00:00:00 2001 From: Arsh Anwar <45912425+d4rk-lucif3r@users.noreply.github.com> Date: Tue, 1 Mar 2022 14:01:56 +0530 Subject: [PATCH] =?UTF-8?q?Removed=20Deprecated=20Stuff=20-=20Criterion=20?= =?UTF-8?q?=E2=80=9Cmse=E2=80=9D=20was=20deprecated=20in=20v1.0=20so=20rep?= =?UTF-8?q?laced=20it=20with=20"squared=5Ferror"=20-=20Module=20"sklearn.n?= =?UTF-8?q?eighbors.base"=20has=20been=20changed=20to=20"sklearn.neighbors?= =?UTF-8?q?.=5Fbase"=20so=20updated=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- missingpy/knnimpute.py | 4 ++-- missingpy/missforest.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/missingpy/knnimpute.py b/missingpy/knnimpute.py index a7f3d1c..ef6379d 100644 --- a/missingpy/knnimpute.py +++ b/missingpy/knnimpute.py @@ -10,8 +10,8 @@ from sklearn.utils import check_array from sklearn.utils.validation import check_is_fitted from sklearn.utils.validation import FLOAT_DTYPES -from sklearn.neighbors.base import _check_weights -from sklearn.neighbors.base import _get_weights +from sklearn.neighbors._base import _check_weights +from sklearn.neighbors._base import _get_weights from .pairwise_external import pairwise_distances from .pairwise_external import _get_mask diff --git a/missingpy/missforest.py b/missingpy/missforest.py index d0d2843..29a1d68 100644 --- a/missingpy/missforest.py +++ b/missingpy/missforest.py @@ -82,7 +82,7 @@ class MissForest(BaseEstimator, TransformerMixin): If True, a copy of X will be created. If False, imputation will be done in-place whenever possible. - criterion : tuple, optional (default = ('mse', 'gini')) + criterion : tuple, optional (default = ('squared_error', 'gini')) The function to measure the quality of a split.The first element of the tuple is for the Random Forest Regressor (for imputing numerical variables) while the second element is for the Random Forest @@ -235,7 +235,7 @@ class MissForest(BaseEstimator, TransformerMixin): """ def __init__(self, max_iter=10, decreasing=False, missing_values=np.nan, - copy=True, n_estimators=100, criterion=('mse', 'gini'), + copy=True, n_estimators=100, criterion=('squared_error', 'gini'), max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0,