docs: protected void processChunk() {
          // Compute weights
          double candidateClassifierWeight = this.computeCandidateWeight(this.candidateClassifier, this.currentChunk, this.numFolds);
  
          for (int i = 0; i < this.storedLearners.length; i++) {
              this.storedWeights[i][0] = this.computeWeight(this.storedLearners[(int) this.storedWeights[i][1]], this.currentChunk);
          }
  
          if (this.storedLearners.length < this.maxStoredCount) {
              // Train and add classifier
              for (int num = 0; num < this.chunkSize; num++) {
                  this.candidateClassifier.trainOnInstance(this.currentChunk.instance(num));
              }
  
              this.addToStored(this.candidateClassifier, candidateClassifierWeight);
          } else {
              // Substitute poorest classifier
              java.util.Arrays.sort(this.storedWeights, weightComparator);
  
              if (this.storedWeights[0][0] < candidateClassifierWeight) {
                  for (int num = 0; num < this.chunkSize; num++) {
                      this.candidateClassifier.trainOnInstance(this.currentChunk.instance(num));
                  }
  
                  this.storedWeights[0][0] = candidateClassifierWeight;
                  this.storedLearners[(int) this.storedWeights[0][1]] = this.candidateClassifier.copy();
              }
          }
  
          int ensembleSize = java.lang.Math.min(this.storedLearners.length, this.maxMemberCount);
          this.ensemble = new Classifier[ensembleSize];
          this.ensembleWeights = new double[ensembleSize];
  
          // Sort learners according to their weights
          java.util.Arrays.sort(this.storedWeights, weightComparator);
  
          // Select top k classifiers to construct the ensemble
          int storeSize = this.storedLearners.length;
          for (int i = 0; i < ensembleSize; i++) {
              this.ensembleWeights[i] = this.storedWeights[storeSize - i - 1][0];
              this.ensemble[i] = this.storedLearners[(int) this.storedWeights[storeSize - i - 1][1]];
          }
  
          this.classDistributions = null;
          this.currentChunk = null;
          this.candidateClassifier = (Classifier) getPreparedClassOption(this.learnerOption);
          this.candidateClassifier.resetLearning();
      }