示例#1
0
 def __represent_validation__(self):
     try:
         self.validation_file
     except:
         raise Exception("Please read validation data firts")
     return "model"+str(self)+".validation."+"."+str(self.transformation_for_validation_data)+"." +"."+\
                     str2hash(os.path.basename(self.validation_file))
示例#2
0
 def __repr__(self):  # Representation should reflect all paramteres
     # so that 2 models having same repr are identical
     try:
         self.apply_log
     except:
         raise Exception("Please train model first")
     properties = self.toXMLDict()
     representation = ".".join(list(properties.values()))
     return str2hash(representation)