Skip to content

Commit 6c75554

Browse files
ArlindKadramfeurer
authored andcommitted
Refactoring task.py (#588)
1 parent 7b81dae commit 6c75554

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

openml/tasks/task.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def __init__(self, task_id, task_type_id, task_type, data_set_id,
1818
self.estimation_procedure = dict()
1919
self.estimation_procedure["type"] = estimation_procedure_type
2020
self.estimation_procedure["parameters"] = estimation_parameters
21-
#
2221
self.estimation_parameters = estimation_parameters
2322
self.evaluation_measure = evaluation_measure
2423

@@ -144,11 +143,8 @@ def __init__(self, task_id, task_type_id, task_type, data_set_id,
144143
target_name=target_name,
145144
data_splits_url=data_splits_url,
146145
)
147-
self.target_name = target_name
148146
self.class_labels = class_labels
149147
self.cost_matrix = cost_matrix
150-
self.estimation_procedure["data_splits_url"] = data_splits_url
151-
self.split = None
152148

153149
if cost_matrix is not None:
154150
raise NotImplementedError("Costmatrix")
@@ -187,7 +183,7 @@ def __init__(self, task_id, task_type_id, task_type, data_set_id,
187183
self.number_of_clusters = number_of_clusters
188184

189185

190-
class OpenMLLearningCurveTask(OpenMLSupervisedTask):
186+
class OpenMLLearningCurveTask(OpenMLClassificationTask):
191187
def __init__(self, task_id, task_type_id, task_type, data_set_id,
192188
estimation_procedure_type, estimation_parameters,
193189
evaluation_measure, target_name, data_splits_url,
@@ -202,12 +198,6 @@ def __init__(self, task_id, task_type_id, task_type, data_set_id,
202198
evaluation_measure=evaluation_measure,
203199
target_name=target_name,
204200
data_splits_url=data_splits_url,
201+
class_labels=class_labels,
202+
cost_matrix=cost_matrix
205203
)
206-
self.target_name = target_name
207-
self.class_labels = class_labels
208-
self.cost_matrix = cost_matrix
209-
self.estimation_procedure["data_splits_url"] = data_splits_url
210-
self.split = None
211-
212-
if cost_matrix is not None:
213-
raise NotImplementedError("Costmatrix")

0 commit comments

Comments
 (0)