code: @Override
      protected void _fit(Dataframe trainingData) {
          ModelParameters modelParameters = knowledgeBase.getModelParameters();
          
          Set<Object> goldStandardClasses = modelParameters.getGoldStandardClasses();
          
          //check if there are any gold standard classes
          for(Record r : trainingData) { 
              Object theClass=r.getY();
              if(theClass!=null) {
                  goldStandardClasses.add(theClass); 
              }
          }
          
          //calculate the weights of the features
          calculateFeatureWeights(trainingData);
          
          //initialize clusters
          initializeClusters(trainingData);
          
          //calculate clusters
          calculateClusters(trainingData);
          
          clearClusters();
      }
docs: {@inheritDoc}