Refactored to report prediction confidence.