From 42babeb3fb0fa52ddda2568d7610f0f5ea6b9a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Garrido-Labrador?= Date: Mon, 20 May 2024 12:28:49 +0200 Subject: [PATCH] Repaired bug in --- sslearn/model_selection/_split.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sslearn/model_selection/_split.py b/sslearn/model_selection/_split.py index 0e5cd26..731caa2 100644 --- a/sslearn/model_selection/_split.py +++ b/sslearn/model_selection/_split.py @@ -138,6 +138,8 @@ def artificial_ssl_dataset(X, y, label_rate=0.1, random_state=None, force_minimu if force_minimum is not None: label = np.concatenate((selected, label)) + y_unlabel_original = y[unlabel] + # Create the label and unlabel sets X_label, y_label, X_unlabel, y_unlabel = X[label], y[label],\ X[unlabel], np.array([-1] * len(unlabel)) @@ -151,9 +153,9 @@ def artificial_ssl_dataset(X, y, label_rate=0.1, random_state=None, force_minimu y = pd.Series(y) if indexes: - return X, y, X_unlabel, y_unlabel, label, unlabel + return X, y, X_unlabel, y_unlabel_original, label, unlabel - return X, y, X_unlabel, y_unlabel + return X, y, X_unlabel, y_unlabel_original """