Example #1
0
 def predict_on_batch(self, inputs):
     # inputs shape (,10), corresponding to 5 module predictions of mut and wt
     X = inputs[:, :5] - inputs[:, -5:]
     X = transform(X, True)
     X = np.concatenate([inputs, X[:, -3:]], axis=-1)
     pred = self.model.predict_proba(X)
     return pred
Example #2
0
 def predict_on_batch(self, inputs):
     # inputs shape (,10), corresponding to 5 module predictions of mut and wt
     X = inputs[:, :5] - inputs[:, -5:]
     X = transform(X, True)
     X = X[:, [1, 2, 3, 5]]
     pred = self.model.predict(X)
     return pred
Example #3
0
 def predict_on_batch(self, inputs):
     return LINEAR_MODEL.predict(transform(inputs, False))
Example #4
0
 def predict_on_batch(self, inputs):
     X = transform(inputs, False)
     pred = self.model.predict(X)
     return pred
Example #5
0
 def predict_on_batch(self, inputs):
     '''inputs shape (,10), corresponding to 5 module predictions of mut and wt'''
     X_alt, X_ref = inputs[:, 5:], inputs[:, :-5]
     X = transform(X_alt - X_ref, True)
     X = np.concatenate([X_ref, X_alt, X[:, -3:]], axis=-1)
     return LOGISTIC_MODEL.predict_proba(X)
Example #6
0
 def predict_on_batch(self, inputs):
     '''inputs shape (,10), corresponding to 5 module predictions of mut and wt'''
     X = transform(inputs[:, :5] - inputs[:, -5:], True)[:, [1, 2, 3, 5]]
     return EFFICIENCY_MODEL.predict(X)