garydoranjr / misvm

Multiple-Instance Support Vector Machines
BSD 3-Clause "New" or "Revised" License
234 stars 81 forks source link

NaN predicted values #25

Closed shehrozskhan closed 4 years ago

shehrozskhan commented 4 years ago

The classifier.predict() method outputs NaN values for some test bags (in case of sbMIL classifier that I checked on my dataset). Could you please advise why it would predict NaN values and how to resolve it?

garydoranjr commented 4 years ago

Hi @titubeta, I'm not sure exactly what's going wrong without more information. For example, it could be that some instances have NaN feature values as input, in which case the prediction could be NaN. If it's only for certain bags I would suspect the cause is related to some characteristic of the input data rather than the trained model. You could try using the instancePrediction=True option to the predict function to get individual instance predictions and see which individual instances are causing NaN outputs.

shehrozskhan commented 4 years ago

Thanks.