Evaluation error

How could I solve this error
IndexError: boolean index did not match indexed array along dimension 0; dimension is 1551 but corresponding boolean dimension is 4754. View the submission for more details.

Hi @aiad_asaad

So this is happening because your model is not generating the correct number of predictions. In the dataset. It may be because you are dropping some rows or something like that.

Can you provide your submission number so I can look into it further?

this is the submission ID :118600

I tried to not delete the NaN values but there where error happens. Therefore I have created a function to delete all the Null values and the duplicates as well. I do not Know what is the error of this I think it should be ok

Hi @aiad_asaad

Yes so I’ve looked through your submission and indeed your cleaning function is dropping rows with NaN values.

In the real world and in this challenge, sometimes the data that you receive will be incomplete, but you will still have to offer a price to those policies. Hence the model should be able to handle such a case.

In your case this is not handled yet, this is why you are running into this error.

There are many ways to account for this kind of thing, two possible ways could be:

  1. Fill the NaN values with some other reasonable value (linear interpolation, mean value, zero etc)
  2. Keep those as NaN split the data into two sets (a) with NaN and (b) without NaN and then give different prices to (a) and (b). This way you can set the prices higher for (a) to account for the uncertainty
1 Like