Regressor to estimate probability from samples
Assume that X are features and y - labels

#Put algorithm as you wish 
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier(max_depth=2, random_state=0)
clf.fit(X_train, y_train )


clf.predict_proba(X_test) # there you will get probabilities of the class