code: @Override
      protected void _fit(Dataframe trainingData) {
          knowledgeBase.getTrainingParameters().getSvmParameter().probability=1; //probabilities are required from the algorithm
          
          ModelParameters modelParameters = knowledgeBase.getModelParameters();
          
          
          Map<Object, Integer> featureIds = modelParameters.getFeatureIds();
          Map<Object, Integer> classIds = modelParameters.getClassIds();
          Set<Object> classesSet = modelParameters.getClasses(); //we need to maintain this because inherited code relies on it
          
          //build the classIds and featureIds maps
          int classId = 0;
          int featureId = 0;
          for(Record r : trainingData) { 
              Object theClass=r.getY();
              
              if(classesSet.add(theClass)) {
                  classIds.put(theClass, classId++);
              }
              
              for(Map.Entry<Object, Object> entry : r.getX().entrySet()) {
                  Object feature = entry.getKey();
                  if(featureIds.putIfAbsent(feature, featureId) == null) {
                      featureId++;
                  }
              }
          }
          
          //calling the method that handles the training with LibSVM library
          libSVMTrainer(trainingData);
      }
docs: {@inheritDoc}