classes = file.readline().strip()
header = classes.lower().startswith("classes:")
if header:
classes = set(x.strip() for x in classes[8:].split(","))
names = set(classes)
else:
names = set()
classes = set()
file.seek(0)
reader = csv.reader(file)
for line in reader:
names.update(mo.split("=")[0] for mo in line)
n_elements += len(line)
return names - classes, classes, n_elements, reader.line_num, header
def construct_domain(self, names, classes):
attributes = [ContinuousVariable.make(name) for name in sorted(names)]