def main():
    if args.predict == "pred":
        ratio = 1.0
        with open(args.output, 'w') as outfile:
            outfile.write('ID,IsClick\n')
            avg_p = 0
            cnt = 0
            for ID, preds in izip(read_sample("data/sampleSubmission.csv"), read_preds([args.input])):
                preds[0] = min(preds[0] * ratio, 1.0)
                avg_p += preds[0]
                cnt += 1
                outfile.write('%s,%s\n' % (ID, str(preds[0])))
            print avg_p / cnt
    elif args.predict == "cv":
        cv_method()
    elif args.predict == "stack":
        stack_method()
dataset/ETHPy150Open Gzsiceberg/kaggle-avito/ensemble/stack.py/main/original