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做特征數量的改造,別忘了這點。