diff --git a/cml/domain/reconstruction.py b/cml/domain/reconstruction.py index 204212856553370a23426f4143f45bd54610b4cf..d6c29648ba6d11ed4f3537c43f8ba54de40262ae 100644 --- a/cml/domain/reconstruction.py +++ b/cml/domain/reconstruction.py @@ -243,32 +243,32 @@ class Reconstructor: # check constraints if self._valid_reconstructed(trained_model, "conceptual"): - reliability = self.calc_reliability( - trained_model, learnblock, krippen) + reliability = self.calc_reliability(trained_model, learnblock, + krippen) ################################################################### self.logger.protocol("{:<20}: {}".format("Reliability", str(reliability))) ################################################################### if reliability >= self.settings.min_reliability: if not meta: - prag_meta_data = Metadata( - "C", - tier, - next(self.free_id), - learnblock.indexes, - learnblock.columns(), - learnblock.get_column_values("Z"), - learnblock.min_timestamp, - learnblock.max_timestamp, - (model.subject, ), - (".".join(["C", str(tier), learnblock.purpose]), ) + uid = ".".join([self.CONCEPTUAL_KNOWLEDGE_ABBREVIATION, + str(tier), + learnblock.purpose]) + meta = Metadata(self.CONCEPTUAL_KNOWLEDGE_ABBREVIATION, + tier, + self.NEXT_MODEL_COUNTER(tier), + learnblock.indexes, + learnblock.columns(), + learnblock.get_column_values("Z"), + learnblock.min_timestamp, + learnblock.max_timestamp, + (model.subject, ), + (uid, )) + reliability_to_model[reliability].append( + PragmaticMachineLearningModel( + meta, trained_model, learnblock ) - else: - prag_meta_data = meta + ) - reliability_to_model[reliability].append( - PragmaticMachineLearningModel(prag_meta_data, - trained_model, - learnblock)) return reliability_to_model def _reconstruct_procedural(self,