C2W1 - #UNQ_C4 Incorrect loop used in `add_interactions` function

Functions are all correct and all tests are passed, still keep getting this error.
Need help!
Thanks!
Lab Id: xafbjnhezepp

1 Like

Dear @jialeichen,

Which errors are you getting. Please describe.

Hi @Girijesh,
Thanks for your response!

I got the following error:
Incorrect loop used in add_interactions function

I double checked my loop body, and I am indeed using m in the loop instead of re-calculating.

Thanks!

@Girijesh I’m not sure I understand what you are saying…
I suppose this add_interactions function is just calculating the product between every feature columns right?

Do you mind if I message you my code?

Thanks!

for the code line, make sure you used the right column :point_down:t2:

choose the index of column ‘j’ to be greater than column i, (i+1, m)

Anyways, probably the mentor you are asking should be able to help you out as you are seeking help from him.

Another issue last time learner had when they edited out naming and getting feature data in one step and use the same combination in the feature i_j interaction.

Good luck

@Deepti_Prasad
You are right, I mistakenly used (i, m) for the range of column j instead of (i+1, m). Now the lab has passed :smiley:
Thank you!

1 Like