def test_compute_recall():
 tp_pyval = 4
 ys_pyval = np.asarray([0, 1, 1, 0, 1, 1, 0])
 tp = sharedX(tp_pyval, name='tp')
 ys = sharedX(ys_pyval, name='ys_pyval')
 recall_py = (tp_pyval / ys_pyval.sum())
 recall = compute_recall(ys, tp)
 assert np.allclose(recall.eval(), recall_py)

def test_compute_recall ( ) : tp_pyval = 4 ys_pyval = np . asarray ( [ 0 , 1 , 1 , 0 , 1 , 1 , 0 ] ) tp = sharedX ( tp_pyval , name = 'tp' ) ys = sharedX ( ys_pyval , name = 'ys_pyval' ) recall_py = ( tp_pyval / ys_pyval . sum ( ) ) recall = compute_recall ( ys , tp ) assert np . allclose ( recall . eval ( ) , recall_py )
tests whether compute_recall function works as expected .