def accuracy(df, column):
    totalcount = len(df.realclass)
    tp = sum(((df.realclass > 0.5) & (df[column] > 0.5)))
    tn = sum(((df.realclass <= 0.5) & (df[column] <= 0.5)))
    fp = sum(((df.realclass <= 0.5) & (df[column] > 0.5)))
    fn = sum(((df.realclass > 0.5) & (df[column] <= 0.5)))
    assert (totalcount == (((tp + fp) + tn) + fn))
    return ((tp + tn) / totalcount)
def accuracy(df, column):
    totalcount = len(df.realclass)
    tp = sum(((df.realclass > 0.5) & (df[column] > 0.5)))
    tn = sum(((df.realclass <= 0.5) & (df[column] <= 0.5)))
    fp = sum(((df.realclass <= 0.5) & (df[column] > 0.5)))
    fn = sum(((df.realclass > 0.5) & (df[column] <= 0.5)))
    assert (totalcount == (((tp + fp) + tn) + fn))
    return ((tp + tn) / totalcount)