Getting a value error when evaluating a model on test data
- Dominant language
- Jupyter Notebook
- Stars
- 30k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
```
ValueError: Number of features of the input must be equal to or greater than that of the fitted transformer. Transformer n_features is 13 and input n_features is 9.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
28 y_test = strat_test_set["median_house_value"].copy()
29
---> 30 x_test_prepared = full_pipeline.transform(x_test)
31
32 final_predictions = final_model.predict(x_test_prepared)
~/anaconda3/lib/python3.7/site-packages/sklearn/compose/_column_transformer.py in transform(self, X)
583 'transformer. Transformer n_features is {0} '
584 'and input n_features is {1}.'
--> 585 .format(self._n_features, X.shape[1]))
586
587 # No column reordering allowed for named cols combined with remainder
```
**ValueError: Number of features of the input must be equal to or greater than that of the fitted transformer. Transformer n_features is 13 and input n_features is 9.**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.