Created
May 19, 2019 12:41
-
-
Save shubham0204/8c7a13d676650ce947644f23a7daf2b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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