Random Forest probability values


I am following the below example for random forest (it is working quite well for a my case).

What I need additionally is to get the probability of each pixel classification. The classification scenario of machine learning models (random forest in this case) are usually estimating the probability of a being classified as a class.
Thus, in addition to a classified map (like 0 and 1 for a binary example), I want to export maps with probability values that random forest is calculating for each pixel.


Hi Mohammad,

Interesting suggestion. It is something we discussed internally before, but have no implementation for yet.

It is probably possible to implement in an UDF.

I logged a ticket, but it is not planned in yet: Implement predict_probabilities · Issue #775 · Open-EO/openeo-geopyspark-driver · GitHub

With a NoR support package it could get a higher priority.

Emile Sonneveld

Hi Emile,

Thanks for your consideration.
I hope it will be a solution for it.



We also have an experimental catboost feature that should support probabilities. Would that be useful for you?


Hi Emile,

Can you please share with me the documentation of catboost?


We don’t have documentation on it. But we have an advanced example where ONNX is used to run machine learning models. It is quite a standard library that supports probabilities

Training the model here (ONNX should support catboost and random_forest):

ONNX conversion example:

Inference notebook:

The actual UDF where you would want to adapt the apply_datacube:

We usually upload the model to our artifactory. But you can probably upload on your own filehost too.