From 86aa9ed8c5da4f5e4d39625cf955dcff26a67f12 Mon Sep 17 00:00:00 2001 From: mi4ux Date: Tue, 25 Jul 2023 09:10:31 +0200 Subject: [PATCH] Update 200_image_classification_using_GLCM.py Only fit the label transformation on the train set and use it to transform both the train and the test set. --- 200_image_classification_using_GLCM.py | 1 - 1 file changed, 1 deletion(-) diff --git a/200_image_classification_using_GLCM.py b/200_image_classification_using_GLCM.py index 618aeec42..5feb7cd10 100644 --- a/200_image_classification_using_GLCM.py +++ b/200_image_classification_using_GLCM.py @@ -68,7 +68,6 @@ le = preprocessing.LabelEncoder() le.fit(test_labels) test_labels_encoded = le.transform(test_labels) -le.fit(train_labels) train_labels_encoded = le.transform(train_labels) #Split data into test and train datasets (already split but assigning to meaningful convention)