code: @Override
      public Prediction _predictRecord(Record r) {
          Set<Object> classesSet = knowledgeBase.getModelParameters().getClasses();
          
          AssociativeArray predictionScores = new AssociativeArray();
          for(Object theClass : classesSet) {
              predictionScores.put(theClass, calculateClassScore(r.getX(), theClass));
          }
          
          Object predictedClass=getSelectedClassFromClassScores(predictionScores);
  
          Descriptives.normalizeExp(predictionScores);
          
          return new Prediction(predictedClass, predictionScores);
      }
docs: {@inheritDoc}