Modify the python code in order to `predict` with Java API
Improve the performance to deal with sparce vectors