Last answered:

28 Dec 2023

Posted on:

12 Mar 2023

0

Fix this problem "The feature names should match those that were passed during fit."

In line [37] I got this error:

ValueError: The feature names should match those that were passed during fit.
Feature names unseen at fit time:
- Price_Range
- Promotion
Feature names seen at fit time, yet now missing:
- Mean_Price
- Mean_Promotion

6 answers ( 0 marked as helpful)
Instructor
Posted on:

14 Mar 2023

0

Hi Le, 

thanks for reaching out! Could you send a screenshot of your notebook with the cell in question, which causes the error?

Thanks in advance!


Best, 

365 Eli

Posted on:

20 Mar 2023

0

change columns names:

- Price_Range
- Promotion
and
- Mean_Price
- Mean_Promotion


to the same ones, ie eg Price, Promotion for both data frames



Posted on:

05 Apr 2023

0

 ValueError

Cell In[99], line 1

----> 1 Y_promotion = model_incidence_promotion.predict_proba(df_price_elasticity_promotion)

...
- Promotion

Feature names seen at fit time, yet now missing:

- Mean_Price

- Mean_Promotion

Posted on:

06 Jul 2023

0

Run the model_incidence_promotion.fit(X, Y) again before going on to using it as a feature in the predict_proba. That way it will contain the newly defined characteristics

Posted on:

03 Oct 2023

0

the score function is not  giving value even lineaRegression is not providing value just shows this function

Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

28 Dec 2023

0

I found that rather than using columns named Price Point and Promotion, we  should use the exactly the same columns name for prediction. 

so for df_price_elasticity_promotion, the columns should be ['Mean_Price', 'Mean_Promotion'].

Dunno why it can be run without problem in the video.

Submit an answer