c:\users\admin\appdata\local\programs\python\python39\lib\site-packages\sklearn\base.py:450: UserWarning: X does not have valid feature names, but RandomForestRegressor was fitted with feature names
warnings.warn(
您好 前面是这样的
#GRM training
y_test_growth,yhat_growth,pred_growth,r2 = GRM_training_prediction(df4,np.array(pred_LDP).T)
#Store predicted growth rate into a csv file
df5 = pd.DataFrame()
df5['Measured Growth Rate'] = np.array(y_test_growth).reshape(-1)
df5['Predicted Growth Rate'] = np.array(yhat_growth).reshape(-1)
#df5.to_csv('Measured_vs_Predicted_gorwth_rate.csv')
#print r2 scroe
print(r2) #output should be ~0.992
df5.head()
贴个错误也不知道贴全了
大体是X这个变量出问题了
具体什么问题没贴