public void calculateLabelPrior ( ) { double prior = 1D / model . labelIndexer . getLabelSize ( ) ; model . labelIndexer . getIndexSet ( ) . forEach ( labelIndex -> model . labelPrior . put ( labelIndex , prior ) ) ; }
Assume labels have equal probability . Not depends on the training data size .