Пример #1
0
 def predict(self, data_handle):
 
   #predict_strings = self.learner_interface.predict_string(data_handle)
   predict_strings = [x.predict_string(data_handle) for x in 
     self.learner_interface]
   #get_pred_string = self.learner_interface.get_pred_string()
   get_pred_string = [x.get_pred_string() for x in self.learner_interface]
   prStatus = map( lambda c, ps: c.publish_exec(ps), self.coordinator,
     predict_strings)
   pr = unlist(map( lambda c, ps: c.publish_get(ps), self.coordinator, 
     get_pred_string))
   return pr
Пример #2
0
  def fit(self, data_handle):

    train_strings = [x.fit_string(data_handle) for x in self.learner_interface]
    tr = unlist(map(lambda c, ts: c.publish_exec(ts), self.coordinator, 
      train_strings))
    return(tr)