docs: @Override
      public double[] getVotesForInstance(Instance instance) {
          if (this.reset == true) {
              return new double[2];
          }
          double[] probOfClassGivenDoc = new double[m_numClasses];
          double totalSize = totalSize(instance);
  
          for (int i = 0; i < m_numClasses; i++) {
              probOfClassGivenDoc[i] = Math.log(m_probOfClass[i]) - totalSize * Math.log(m_classTotals[i]);
          }
  
          for (int i = 0; i < instance.numValues(); i++) {
  
              int index = instance.index(i);
              if (index == instance.classIndex() || instance.isMissing(i)) {
                  continue;
              }
  
              double wordCount = instance.valueSparse(i);
              for (int c = 0; c < m_numClasses; c++) {
                  double value = m_wordTotalForClass[c].getValue(index);
                  probOfClassGivenDoc[c] += wordCount * Math.log(value == 0 ? this.laplaceCorrectionOption.getValue() : value );
              }
          }
  
          return Utils.logs2probs(probOfClassGivenDoc);
      }