stevenpawley / Pyspatialml

Machine learning modelling for spatial data
GNU General Public License v3.0
145 stars 29 forks source link

predict_proba for multilabel output? #25

Open bluetyson opened 3 years ago

bluetyson commented 3 years ago

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 commented 3 years ago

Something like this?

       ` if isinstance(result, list):
            result = np.array(result)[:,:,1].T`
stevenpawley commented 3 years ago

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 commented 3 years ago

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

RichardScottOZ commented 3 years ago

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