话不多说,直接上代码 def stacking_first(train, train_y, test): savepath = './stack_op{}_dt{}_tfidf{}/'.format(args.option, args.data_type, args.tfidf) os.makedirs(savepath, exist_ok=True) count_kflod = 0 num_folds = 6 kf = KFold(n_splits=num_folds, shuffle=Tru…