comparison recommend.py @ 4:a609d6dc8047 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/rna_commander/tools/rna_tools/rna_commender commit 7ad344d108076116e702e1c1e91cea73d8fcadc4
author rnateam
date Thu, 28 Jul 2016 05:55:25 -0400
parents 8918de535391
children
comparison
equal deleted inserted replaced
3:ecf125a1ad73 4:a609d6dc8047
51 51
52 def predict(self): 52 def predict(self):
53 """Predict interaction values.""" 53 """Predict interaction values."""
54 # predict the y_hat 54 # predict the y_hat
55 (p, p_names, r, r_names) = self.predict_dataset 55 (p, p_names, r, r_names) = self.predict_dataset
56 assert p.dtype == 'float32'
57 assert r.dtype == 'float32'
56 y_hat = self.model.predict(p, r) 58 y_hat = self.model.predict(p, r)
57 # sort the interactions according to y_hat 59 # sort the interactions according to y_hat
58 ordering = sorted(range(len(y_hat)), 60 ordering = sorted(range(len(y_hat)),
59 key=lambda x: y_hat[x], reverse=True) 61 key=lambda x: y_hat[x], reverse=True)
60 p_names = p_names[ordering] 62 p_names = p_names[ordering]