Closed shehrozskhan closed 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.
Thanks.
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?