def update_model(self, training_data, user_ls):
     '''
     update parameters for users in user_ls
     '''
     filtered_data = {u:training_data[u] for u in user_ls}
     new_param = process_latencies(to_lat_dict(filtered_data),
                                     lambda x: stats.gamma.fit(
                                         x, floc=0),
                                     lambda: (-1., -1., -1.)
     )
     for u in user_ls:
         self.params[u] = new_param[u]
 def estimate_model(self, training_data, val_data):
     self.params = process_latencies(to_lat_dict(training_data),
                                     lambda x: stats.gamma.fit(
                                         x, floc=0),
                                     lambda: (-1.,-1.,-1.)
     )
 def estimate_model(self, training_data, val_data):
     self.params = to_lat_dict(training_data)
 def update_model(self, training_data, user_ls):
     '''
     optimization could be made to only merge user_ls's 
     latency dictionaries.
     '''
     self.params = to_lat_dict(training_data)
 def estimate_model(self,inner_train,inner_val):
     self.inn_train_model = process_latencies(
                             to_lat_dict(inner_train),kdensity,lambda: 0)
     self.inn_val_model = process_latencies(to_lat_dict(inner_val),kdensity,lambda: 0)