DataWhale AI春训营 问题汇总
1.没用下载训练集导致出错,爆错如下。
这个时候需要去比赛官网下载对应的初赛训练集
unzip -d /mnt/workspace/sais_third_new_energy_baseline/data /mnt/workspace/sais_third_new_energy_baseline/初赛训练集.zip
在命令行执行这个命令解压
2.没定义测试集
test = pd.concat(data, axis=0).reset_index(drop=True)
利用这行代码构建test测试集。
3.预测时提供的数据特征数量(8 个特征)与训练模型时使用的数据特征数量(10 个特征)不一致
[LightGBM] [Fatal] The number of features in data (8) is not the same as it was in training data (10).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
LightGBMError: The number of features in data (8) is not the same as it was in training data (10).
You can set ``predict_disable_shape_check=true`` to discard this error, but please be aware what you are doing.
test = feature_combine(test)
test = test.dropna().reset_index(drop=True)
之前未建立test,所有未给test做特征数量的改造,别忘了这点。