Пример #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
Пример #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
Пример #3
0
 def predict_on_batch(self, inputs):
     return LINEAR_MODEL.predict(transform(inputs, False))
Пример #4
0
 def predict_on_batch(self, inputs):
     X = transform(inputs, False)
     pred = self.model.predict(X)
     return pred
Пример #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)
Пример #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)