From 17bb6817d60acdd4461dab9bc02a081641af3246 Mon Sep 17 00:00:00 2001 From: Gildas Morvan Date: Tue, 5 Dec 2023 11:21:06 +0100 Subject: [PATCH] Update learner.py --- pyxai/sources/learning/learner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyxai/sources/learning/learner.py b/pyxai/sources/learning/learner.py index c836eb8..161def9 100644 --- a/pyxai/sources/learning/learner.py +++ b/pyxai/sources/learning/learner.py @@ -123,7 +123,7 @@ def load_data(self, dataframe, datasetname, *, encode_labels=True): dataframe: A pandas.core.frame.DataFrame object. """ self.dataset_name = datasetname - self.data = dataframe + self.data = dataframe.copy() Tools.verbose("data:") Tools.verbose(self.data) self.n_instances, self.n_features = self.data.shape @@ -737,4 +737,4 @@ def _get_data(self, dataset, possible_indexes, n): possible_indexes = [i for i in range(len(self.data))] data = numpy.array([self.data[x] for x in possible_indexes]) labels = numpy.array([self.labels[x] for x in possible_indexes]) - return possible_indexes, data, labels \ No newline at end of file + return possible_indexes, data, labels