Shortname property on Retrainer

This commit is contained in:
Petrônio Cândido de Lima e Silva 2018-11-01 17:17:24 -03:00 committed by GitHub
parent b677a0e627
commit 307836f261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,13 @@ class Retrainer(fts.FTS):
self.is_high_order = True self.is_high_order = True
self.uod_clip = False self.uod_clip = False
@property
def shortname(self):
if self.model is None:
self.model = self.fts_method()
return self.model.shortname
def train(self, data, **kwargs): def train(self, data, **kwargs):
self.partitioner = self.partitioner_method(data=data, **self.partitioner_params) self.partitioner = self.partitioner_method(data=data, **self.partitioner_params)
self.model = self.fts_method(partitioner=self.partitioner, order=self.order, **self.fts_params) self.model = self.fts_method(partitioner=self.partitioner, order=self.order, **self.fts_params)