Pyspatialml icon indicating copy to clipboard operation
Pyspatialml copied to clipboard

predict_proba for multilabel output?

Open bluetyson opened this issue 3 years ago • 4 comments

Hi Steven,

I was just wondering about this today ... what would you do, stick a check in and if there is a list there, extract all the positive probabilities for each output and shape into the multiclass proba shape - as for making a raster output, sort of the same thing?

bluetyson avatar Mar 03 '21 08:03 bluetyson

Something like this?

       ` if isinstance(result, list):
            result = np.array(result)[:,:,1].T`

bluetyson avatar Mar 03 '21 10:03 bluetyson

I'm not sure if I completely follow, but adding predict_proba for the multilabel case is something that I'm happy to look into and implement. I haven't had a need for it until now, but I'm currently working on something that could deal with multilabels.

stevenpawley avatar Mar 04 '21 19:03 stevenpawley

But, yes, something like the isinstance(result, list) to catch the output for multilabel cases

stevenpawley avatar Mar 04 '21 20:03 stevenpawley

Yes, that is what I meant Steven. A hack version seemed to work as a test, anyway.

RichardScottOZ avatar Mar 04 '21 23:03 RichardScottOZ