code: @Override
      protected void _fit(Dataframe trainingData) {
          TrainingParameters trainingParameters = knowledgeBase.getTrainingParameters();
          Configuration configuration = knowledgeBase.getConfiguration();
  
          //reset previous entries on the bundle
          resetBundle();
  
          //perform stepwise
          int maxIterations = trainingParameters.getMaxIterations();
          double aOut = trainingParameters.getAout();
          
          //copy data before starting
          Dataframe copiedTrainingData = trainingData.copy();
          
          //backword elimination algorithm
          for(int iteration = 0; iteration<maxIterations ; ++iteration) {
              
              Map<Object, Double> pvalues = runRegression(copiedTrainingData);
              
              if(pvalues.isEmpty()) {
                  break; //no more features
              }
              
              //fetch the feature with highest pvalue, excluding constant
              pvalues.remove(Dataframe.COLUMN_NAME_CONSTANT);
              Map.Entry<Object, Double> maxPvalueEntry = MapMethods.selectMaxKeyValue(pvalues);
              //pvalues=null;
              
              if(maxPvalueEntry.getValue()<=aOut) {
                  break; //nothing to remove, the highest pvalue is less than the aOut
              }
              
              
              Set<Object> removedFeatures = new HashSet<>();
              removedFeatures.add(maxPvalueEntry.getKey());
              copiedTrainingData.dropXColumns(removedFeatures);
              //removedFeatures = null;
              
              if(copiedTrainingData.xColumnSize()==0) {
                  break; //if no more features exit
              }
          }
          
          //once we have the dataset has been cleared from the unnecessary columns train the model once again
          AbstractRegressor mlregressor = MLBuilder.create(
                  knowledgeBase.getTrainingParameters().getRegressionTrainingParameters(),
                  configuration
          );
          mlregressor.fit(copiedTrainingData);
          bundle.put(REG_KEY, mlregressor);
  
          copiedTrainingData.close();
      }
docs: {@inheritDoc}