public void split (FeatureSelection fs)
		{
			if (ilist == null)
				throw new IllegalStateException ("Frozen.  Cannot split.");
			InstanceList ilist0 = new InstanceList (ilist.getPipe());
			InstanceList ilist1 = new InstanceList (ilist.getPipe());
			for (int i = 0; i < ilist.size(); i++) {
				Instance instance = ilist.getInstance(i);
				FeatureVector fv = (FeatureVector) instance.getData ();
				// xxx What test should this be?  What to do with negative values?
					// Whatever is decided here should also go in InfoGain.calcInfoGains()
				if (fv.value (featureIndex) != 0) {
					//System.out.println ("list1 add "+instance.getUri()+" weight="+ilist.getInstanceWeight(i));
					ilist1.add (instance, ilist.getInstanceWeight(i));
				} else {
					//System.out.println ("list0 add "+instance.getUri()+" weight="+ilist.getInstanceWeight(i));
					ilist0.add (instance, ilist.getInstanceWeight(i));
				}
			}
			logger.info("child0="+ilist0.size()+" child1="+ilist1.size());
			child0 = new Node (ilist0, this, fs);
			child1 = new Node (ilist1, this, fs);
		}
public void split (FeatureSelection fs)
		{
			if (ilist == null)
				throw new IllegalStateException ("Frozen.  Cannot split.");
			InstanceList ilist0 = new InstanceList (ilist.getPipe());
			InstanceList ilist1 = new InstanceList (ilist.getPipe());
			for (int i = 0; i < ilist.size(); i++) {
				Instance instance = ilist.getInstance(i);
				FeatureVector fv = (FeatureVector) instance.getData ();
			
				
				if (fv.value (featureIndex) != 0) {
				
					ilist1.add (instance, ilist.getInstanceWeight(i));
				} else {
				
					ilist0.add (instance, ilist.getInstanceWeight(i));
				}
			}
			logger.info("child0="+ilist0.size()+" child1="+ilist1.size());
			child0 = new Node (ilist0, this, fs);
			child1 = new Node (ilist1, this, fs);
		}
public void split (featureselection fs) { if (ilist == null) throw new illegalstateexception ("frozen. cannot split."); instancelist ilist0 = new instancelist (ilist.getpipe()); instancelist ilist1 = new instancelist (ilist.getpipe()); for (int i = 0; i < ilist.size(); i++) { instance instance = ilist.getinstance(i); featurevector fv = (featurevector) instance.getdata (); if (fv.value (featureindex) != 0) { ilist1.add (instance, ilist.getinstanceweight(i)); } else { ilist0.add (instance, ilist.getinstanceweight(i)); } } logger.info("child0="+ilist0.size()+" child1="+ilist1.size()); child0 = new node (ilist0, this, fs); child1 = new node (ilist1, this, fs); }