From 87cbc2695ea9e71f8e8cffd6a4e3b07f1cb6b12d Mon Sep 17 00:00:00 2001 From: jak_tkvs <32125829+jckkvs@users.noreply.github.com> Date: Fri, 10 Feb 2023 15:16:11 +0900 Subject: [PATCH] y.reshape(-1,) for compatibility of sklearn pipeline --- skrebate/relieff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skrebate/relieff.py b/skrebate/relieff.py index b190056..2ce2ef1 100644 --- a/skrebate/relieff.py +++ b/skrebate/relieff.py @@ -100,7 +100,7 @@ def fit(self, X, y, weights=None): Copy of the ReliefF instance """ self._X = X # matrix of predictive variables ('independent variables') - self._y = y # vector of values for outcome variable ('dependent variable') + self._y = np.array(y).reshape(-1,) # vector of values for outcome variable ('dependent variable') if isinstance(weights, np.ndarray): if isinstance(weights, np.ndarray): if len(weights) != len(X[0]):