LibSVM setprobabilityestimates runs in loop
===

Here is my code:


    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.ObjectOutputStream;

    import weka.classifiers.functions.LibSVM;
    import weka.core.Attribute;
    import weka.core.FastVector;
    import weka.core.Instance;
    import weka.core.Instances;
    import weka.core.SelectedTag;



    public class ChurnPropensityTrain {

	public static void serializeSVM(LibSVM svm) {

		try {
			ObjectOutputStream out = new ObjectOutputStream(new 
    FileOutputStream("E:\\Repo\\wico\\WD-
    UEI\\code\\ChurnPropensityTraining\\dataj48CustomerChurn.model"));
			out.writeObject(svm);
			out.flush();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

	public static void main(String args[]) {

		LibSVM l = new LibSVM();
		FastVector fvWekaAttributes = null;

		//try{
		// Open the file that is the first 
		// command line parameter
		FileInputStream fstream = null;
		try {
			fstream = new FileInputStream("E:\\Repo\\wico\\WD-
    UEI\\code\\ChurnPropensityTraining\\data\\trainingset.csv");
		} catch (FileNotFoundException e1) {
			e1.printStackTrace();
		}
		// Get the object of DataInputStream
		DataInputStream in = new DataInputStream(fstream);
		BufferedReader br = new BufferedReader(new InputStreamReader(in));
		String strLine;

		String attrArray[] = {"accnt_length", "area_code", "intl_plan", 
    "voicemail_plan", "no_vmail_messages",
				"day_mins", "day_calls", "day_charge",
				"eve_mins", "eve_calls", "eve_charge",
				"night_mins", "night_calls", "night_charge",
				"intl_mins", "intl_calls", "intl_charge",
				"no_cust_serv_calls"};

		fvWekaAttributes = new FastVector(19);
		//Attribute[] attrs = new Attribute[18];
		try {
			for(int i=0;i<attrArray.length; i++) {

				if( i==2 || i==3) {
					FastVector fvNominalVal = new FastVector(2);
					fvNominalVal.addElement("yes");
					fvNominalVal.addElement("no");
					Attribute ClassAttribute = new 
    Attribute(attrArray[i], fvNominalVal);
					fvWekaAttributes.addElement(ClassAttribute);
					continue;
				}
				else
					fvWekaAttributes.addElement(new 
    Attribute(attrArray[i]));
			}
		}
		catch(Exception e) {
			System.out.println("here");
			System.out.println(e.getMessage());
		}

		FastVector fvNominalVal = new FastVector(2);
		fvNominalVal.addElement("True.");
		fvNominalVal.addElement("False.");
		Attribute ClassAttribute = new Attribute("class", fvNominalVal);

		fvWekaAttributes.addElement(ClassAttribute);

		Instances inpInst = new Instances("Rel", fvWekaAttributes, 1);           
		inpInst.setClassIndex(18);

		//Read File Line By Line
		try {
			while ((strLine = br.readLine()) != null)   {
				// Print the content on the console
				String[] values = strLine.split(",");

				Instance inst = new Instance(19);
				for(int i=0; i<19; i++) {
					if(i ==2 || i==3 || i==18)
						   
     inst.setValue((Attribute)fvWekaAttributes.elementAt(i), values[i].trim());
					else
						
    inst.setValue((Attribute)fvWekaAttributes.elementAt(i), 
    Double.valueOf(values[i].trim()));
					inpInst.add(inst);
				}

				
			}
			SelectedTag k = new SelectedTag(0, LibSVM.TAGS_KERNELTYPE);
            SelectedTag s = new SelectedTag(0, LibSVM.TAGS_SVMTYPE);
            
            l.setKernelType(k);
            l.setSVMType(s);
            l.setProbabilityEstimates(true);
            l.buildClassifier(inpInst);

			serializeSVM(l);

			System.out.println (strLine);
			//Close the input stream
			in.close();
		}
		catch (Exception e){//Catch exception if any
			System.out.println("herer it is");
			System.err.println("Error: " + e.getMessage());
		}
	}
    }

I see that the buildClassifier runs in loop printing the SVM model details on and on, but I don't see any loop here.