- implemented KMeans
- fixed non seeded rng
- fixed display exception with NoTargets
- added basic test cases to app
This commit is contained in:
2024-08-12 22:09:41 +02:00
parent 7739878a2c
commit 8e8e0b2d51
4 changed files with 83 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ class MLAlgorithm(ABC):
print(f"Loss test : {self.test_loss():0.5f}")
if self._target_type == TargetType.Regression:
print(f"R^2 : {self.test_r_squared():0.5f}")
else:
elif self._target_type != TargetType.NoTarget:
conf = self.test_confusion_matrix()
print(f"Accuracy : {conf.accuracy():0.5f} - classes {conf.accuracy_per_class()}")
print(f"Precision : {conf.precision():0.5f} - classes {conf.precision_per_class()}")