WrapUpQuiz - 5

I get the following error when I cross validate by using numerical_features.

Found input variables with inconsistent numbers of samples: [24, 1460]

It would be helpful for me if someone helps me to overcome this.

Could you provide the code that triggers this error. Without it, it is rather difficult to give you hints. You can add a code block with triple backticks

```python
# Some python code
```
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
from sklearn.impute import SimpleImputer
from sklearn.model_selection import cross_validate

pipeline = make_pipeline(StandardScaler(), SimpleImputer(strategy='mean'), LogisticRegression())

cv_result = cross_validate(pipeline, numerical_features, target, cv=5)
cv_result

I “guess” that you error is coming from the variable numerical_features. We expect this variable to contain the data. If numercial_features contains the name of the column, you need to select the data associated with these columns and pass it to cross_validate;

data_numerical = data[numerical_features]
cross_validate(pipeline, data_numerical, target, cv=5)

However, I would need to see the definition of numerical_features to be sure without guessing :slight_smile: