Commit b001c617 authored by Anze Vavpetic's avatar Anze Vavpetic
Browse files

sort class values when dumping to arff

parent 33667643
......@@ -99,7 +99,7 @@ def dump_dataset(features, feature_format, evaluations, train_context,
target_vals = ('negative', 'positive')
else:
orng_target = train_context.orng_tables[target]
target_vals = tuple(orng_target.domain.classVar.values)
target_vals = tuple(sorted(orng_target.domain.classVar.values))
class_attr = ('class', target_vals)
data['attributes'].append(class_attr)
for line in evaluations.splitlines():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment