Implement the predictProbability. Still needs refactor and unit tests