November 2018
Beginner to intermediate
348 pages
8h 32m
English
Here, we imagine an alternative design of Class:
type Class stringconst ( Ham Class = "Ham" Spam Class = "Spam")
With this change, we will have to update the definition of Classifier:
type Classifier struct { corpus *corpus.Corpus tfidfs map[Class]*tfidf.TFIDF totals map[Class]float64 ready bool sync.Mutex}
Consider now the steps required to get the totals of class Ham:
Consider now the steps required to get the totals of class Ham if the class design was the original:
Read now
Unlock full access