Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created May 19, 2019 12:41
Show Gist options
  • Save shubham0204/8c7a13d676650ce947644f23a7daf2b0 to your computer and use it in GitHub Desktop.
Save shubham0204/8c7a13d676650ce947644f23a7daf2b0 to your computer and use it in GitHub Desktop.
private fun findClassProbability(classVocab1 : Array<String>, classVocab2 : Array<String> , classVocab : Array<String>) : Float{
val total_words = (classVocab1.count() + classVocab2.count()).toFloat()
val class_count = (classVocab.count()).toFloat()
return ( class_count / total_words )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment