Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created September 28, 2018 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/efd8ca7ba593bbb6feccd57ad263383b to your computer and use it in GitHub Desktop.
Save fitomad/efd8ca7ba593bbb6feccd57ad263383b to your computer and use it in GitHub Desktop.
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