Esempio n. 1
0
def EvaluateSingleContactPrediction(predictedContactMatrix, nativefile):
    native = DataProcessor.LoadNativeDistMatrixFromFile(nativefile)
    accuracy = dict()

    for response in predictedContactMatrix.keys():
        if response.startswith('HB'):
            accuracy[response] = TopAccuracy(
                pred=predictedContactMatrix[response],
                truth=native[response],
                contactCutoff=config.MaxHBDistance)
        else:
            accuracy[response] = TopAccuracy(
                pred=predictedContactMatrix[response], truth=native[response])

    return accuracy
Esempio n. 2
0
def EvaluateSingleCbCbContactPrediction(pred, nativefile):
    native = DataProcessor.LoadNativeDistMatrixFromFile(nativefile)
    accuracy = TopAccuracy(pred, truth=native['CbCb'])
    return accuracy