2017-07-12 XGBoostモデルでpredictすると「AttributeError: 'numpy.ndarray' object has no attribute 'feature_names'」エラー AI 原因はXGBoostのpredictにはndarrayでなく、xgboost.DMatrixを渡さないといけないため。 xgb.DMatrix(x_df)のようにpd.DataFrameをDMatrixに変換して渡すと直った。 参考: stackoverflow.com