ageron / ageron/handson-ml

ValueError: Number of features of the model must match the input

未關閉
#572 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
25.6k
分支
12.7k
PR 合併指標
30 天內沒有已合併 PR

描述

I am using random forest model to predict the sales quantity.
I have listed all parts in a row based while the quantity is in a monlthy based (each column represent a month)
During splitting the data in to train and test:
the training data will have less columns than the test set. meaning that I added one month to the test data.
when i run the model, an error is rasied :
ValueError: Number of features of the model must match the input. Model n_features is 22 and input n_features is 23.

Could you please help me on how to tackle this problem.

your help is really appreciated,
thanks in Advanced

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

No repository file, test, or entry point is named, and the issue provides no code to inspect. Start by examining how the training and test data are split and why the model has 22 features while the input has 23; done means the model and prediction input use matching feature dimensions.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, scikit-learn
領域
machine-learning
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
15/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。