Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
func calculate(_ accuracy: Double) -> Double
return (1 - accuracy) * 100
// Training accuracy as a percentage
let trainingAccuracy = calculate(sentimentClassifier.trainingMetrics.classificationError)
// Validation accuracy as a percentage
let validationAccuracy = calculate(sentimentClassifier.validationMetrics.classificationError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.