code: @Override
      public void trainOnInstance(Instance inst) {
          if (!this.isInit) {
              this.isInit = true;
              InstancesHeader instances = new InstancesHeader(dataset);
              this.learner.setModelContext(instances);
              this.learner.prepareForUse();
          }
          if (inst.weight() > 0) {
              inst.setDataset(dataset);
              learner.trainOnInstance(inst);
          }
      }
docs: Trains this classifier incrementally using the given instance.
  
  @param inst the instance to be used for training