From 6bcb677df65e851c337235dc548f70c61a1a52ba Mon Sep 17 00:00:00 2001
From: Pieter Gijsbers
Date: Thu, 31 Mar 2016 17:03:22 +0200
Subject: [PATCH] Added a clause for when the target attribute class is
capitalized. Should probably reload it so reloading the ARFF file a second
time isnt necessary, but this is a quick fix to make the code work for a
course currently given at TUe.
---
openml/datasets/dataset.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/openml/datasets/dataset.py b/openml/datasets/dataset.py
index dc4b3a414..4267c1d71 100644
--- a/openml/datasets/dataset.py
+++ b/openml/datasets/dataset.py
@@ -249,6 +249,8 @@ def _retrieve_class_labels(self):
dataAttributes = dict(arffData['attributes'])
if('class' in dataAttributes):
return dataAttributes['class']
+ elif('Class' in dataAttributes):
+ return dataAttributes['Class']
else:
return None