protected void selfTrain(Instance testInst) {
        int maxInstances = this.maxInstancesOption.getValue();
        int poolSizeRatio = poolSizeOption.getValue();
        int poolLimit = maxInstances / poolSizeRatio;
        int poolCount = 0;
        VotedInstancePool vInstPool = SelfOzaBoostID.getVotedInstancePool();
        noOfClassesInPool = vInstPool.getNoOfClasses();

        System.out.println("No of instances in the pool: " + vInstPool.getSize());
        System.out.println("No of classes in the pool: " + noOfClassesInPool);

        if (vInstPool.getSize() > 10) {
            ArrayList<Attribute> attrs = new ArrayList<Attribute>();
            for (int i = 0; i < testInst.numAttributes(); i++) {
                attrs.add(testInst.attribute(i));
            }
            Instances instances = new Instances("instances", attrs, vInstPool.getSize());
            Iterator instanceIt = vInstPool.iterator();
            System.out.println("Size of pool: " + vInstPool.getSize());

            while (instanceIt.hasNext() && poolCount < poolLimit) {
                VotedInstance vInstance = (VotedInstance) instanceIt.next();
                ((Instances) instances).add(vInstance.getInstance());
                poolCount++;
            }

            System.out.println("Size of instances: " + instances.size());
            instances = clusterInstances(instances);
            InstanceStream activeStream = new CachedInstancesStream((Instances) instances);

            System.out.println("Selftraining have been started");
            System.out.println("Number of self training instances: " + instances.numInstances());

            long treeSize = vInstPool.getSize();
            long limit = treeSize / SAMPLING_LIMIT;
            Instance inst = null;

            for (long j = 0; j < limit && activeStream.hasMoreInstances(); j++) {
                inst = activeStream.nextInstance();
                if (inst.numAttributes() == attrs.size()) {
                    model.trainOnInstance(inst);
                }
            }
        }

    }