python bindings and prediction