Пример #1
0
    def __init__(self, *args, **kwargs):
        super(Features, self).__init__(*args, **kwargs)
        try:
            from mol_name import get_exact_name
            from ml import get_decay_distance_correction_feature_vector, \
                get_binary_feature_vector, get_decay_feature_vector

            spacer, _ = get_exact_name(self.log.name, spacers=True)
            #exactname = spacer.replace('*', '')
            self.value = '"' + str([
                get_binary_feature_vector(spacer),
                get_decay_feature_vector(spacer),
                get_decay_distance_correction_feature_vector(spacer),
            ]) + '"'
        except:
            self.value = "[]"
        self.done = True
Пример #2
0
 def get_decay_feature_vector(self, **kwargs):
     try:
         exact_name = self.get_exact_name(spacers=True)
         return get_decay_feature_vector(exact_name, **kwargs)
     except ValueError:
         return None
Пример #3
0
 def get_decay_feature_vector(self, **kwargs):
     try:
         exact_name = self.get_exact_name(spacers=True)
         return get_decay_feature_vector(exact_name, **kwargs)
     except ValueError:
         return None