From 2c51996d7d6e671e971e055bb21b9d30a93a012b Mon Sep 17 00:00:00 2001
From: dmt <>
Date: Thu, 24 Oct 2019 21:45:43 +0200
Subject: [PATCH] Add abbreviation attribute to construction machine learning
 models.

---
 cml/ports/ml_adapter.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cml/ports/ml_adapter.py b/cml/ports/ml_adapter.py
index aa56b8b..fcd5212 100644
--- a/cml/ports/ml_adapter.py
+++ b/cml/ports/ml_adapter.py
@@ -66,6 +66,7 @@ class ConstructionClusteringMLModel(MachineLearningModel):
     def __init__(self, model):
         self.__model = model
         self._cluster = 2
+        self.abbreviation = self.__model.__class__.__name__[0:3]
 
     def get_labels(self):
         return self.__model.__getattribute__(
@@ -100,6 +101,7 @@ class ReconstructionConceptualMLModel(MachineLearningModel):
     def __init__(self, model):
         self.__model = model
         self.accuracy = None
+        self.subject = model.__class__.__name__
 
     def train(self, data, *args, **kwargs):
         # TODO (dmt): Improve signature of this function!
@@ -117,6 +119,7 @@ class ReconstructionProceduralMLModel(MachineLearningModel):
         self.__model = model
         self.mean_error = None
         self.max_error = None
+        self.subject = model.__class__.__name__
 
     def train(self, data, *args, **kwargs):
         # TODO (dmt): Provide a better way dealing with
-- 
GitLab