|
|
@@ -57,7 +57,7 @@ class TestResult:
|
|
|
return text
|
|
|
|
|
|
|
|
|
- def csvHeading():
|
|
|
+ def csvHeading(self):
|
|
|
r = [
|
|
|
"F1 score",
|
|
|
"balanced accuracy",
|
|
|
@@ -68,22 +68,22 @@ class TestResult:
|
|
|
]
|
|
|
|
|
|
if self.aps is not None:
|
|
|
- r.append(self.aps)
|
|
|
+ r.append("Aps")
|
|
|
|
|
|
return ";".join(r)
|
|
|
|
|
|
- def toCSV():
|
|
|
- r = [
|
|
|
+ def toCSV(self):
|
|
|
+ r = map(str, [
|
|
|
self.f1,
|
|
|
self.bal_acc,
|
|
|
self.con_mat[0] if len(self.con_mat) > 0 else float(self.con_mat),
|
|
|
self.con_mat[1] if len(self.con_mat) > 1 else 0,
|
|
|
self.con_mat[2] if len(self.con_mat) > 2 else 0,
|
|
|
self.con_mat[3] if len(self.con_mat) > 3 else 0
|
|
|
- ]
|
|
|
+ ])
|
|
|
|
|
|
if self.aps is not None:
|
|
|
- r.append(self.aps)
|
|
|
+ r.append(str(self.aps))
|
|
|
|
|
|
return ";".join(r)
|
|
|
|