import time


def progress(cls_name, stats, test_stats):
    """Report progress information, return a string."""
    duration = time.time() - stats['t0']
    s = "%20s classifier : \t" % cls_name
    s += "%(n_train)6d train ques (%(n_train_pos)6d positive) " % stats
    s += "%(n_test)6d test ques (%(n_test_pos)6d positive) " % test_stats
    s += "accuracy: %(accuracy).3f " % stats
    s += "in %.2fs (%5d ques/s)" % (duration, stats['n_train'] / duration)
    return s