def create_model(self, setis): l = [] for seti_input in setis: feature_vector = seti.create_feature_vector( self.fs, self.model_config.cols_cfg.get_cols_for_memorizing(), seti_input) seti_model_key = seti.standard_repr(feature_vector) l.append((seti_model_key, seti_input.label)) return l
def get_memorized_price(self, seti_input): features = seti.create_feature_vector( self.fs, self.get_columns_for_memorization(), seti_input) key = seti.standard_repr(features) #print 'Serving memorized key' #print key if key in self.memorized_prices: return self.memorized_prices[key] return None