src/train.py
def evaluate(A,C,testSrc,testTgt):
    """ predictC is the prediction, whereas predictA is the groundtruth, undersand this """
    N = len(testSrc)*1.0
    predictC = softmax2num(modelDeduct(C,testSrc))
    predictAs = predByAs(A,testSrc)
    predictA = getLabel(predictAs,testTgt,eb)
    accuracy = sum([(predictC[i]>0 and errMeasure(predictAs[predictC[i]],testTgt[i])<eb) for i in range(N)])/double(N)
 predictC is the prediction, whereas predictA is the groundtruth, undersand this 
predictC is the prediction, whereas predictA is the groundtruth, undersand this
predictC is the prediction whereas predictA is the groundtruth undersand this
def evaluate(A,C,testSrc,testTgt):
    N = len(testSrc)*1.0
    predictC = softmax2num(modelDeduct(C,testSrc))
    predictAs = predByAs(A,testSrc)
    predictA = getLabel(predictAs,testTgt,eb)
    accuracy = sum([(predictC[i]>0 and errMeasure(predictAs[predictC[i]],testTgt[i])<eb) for i in range(N)])/double(N)
def evaluate ( A , C , testSrc , testTgt ) : N = len ( testSrc ) * 1.0 predictC = softmax2num ( modelDeduct ( C , testSrc ) ) predictAs = predByAs ( A , testSrc ) predictA = getLabel ( predictAs , testTgt , eb ) accuracy = sum ( [ ( predictC [ i ] > 0 and errMeasure ( predictAs [ predictC [ i ] ] , testTgt [ i ] ) < eb ) for i in range ( N ) ] ) / double ( N )
predictC is the prediction, whereas predictA is the groundtruth, undersand this
predictC is the prediction whereas predictA is the groundtruth undersand this
""" predictC is the prediction, whereas predictA is the groundtruth, undersand this """
A
C
testSrc
testTgt