code: public void initialLearning( Rectangle2D_F64 targetRegion ,
  								 FastQueue<ImageRectangle> cascadeRegions ) {
  		storageMetric.reset();
  		fernNegative.clear();
  
  
  		// learn the initial descriptor
  		TldHelperFunctions.convertRegion(targetRegion, targetRegion_I32);
  
  		// select the variance the first time using user selected region
  		variance.selectThreshold(targetRegion_I32);
  		// add positive examples
  		template.addDescriptor(true, targetRegion_I32);
  		fern.learnFernNoise(true, targetRegion_I32);
  
  		// Find all the regions which can be used to learn a negative descriptor
  		for( int i = 0; i < cascadeRegions.size; i++ ) {
  			ImageRectangle r = cascadeRegions.get(i);
  
  			// see if it passes the variance test
  			if( !variance.checkVariance(r) )
  				continue;
  
  			// learn features far away from the target region
  			double overlap = helper.computeOverlap(targetRegion_I32, r);
  			if( overlap > config.overlapLower )
  				continue;
  
  			fernNegative.add(r);
  		}
  
  		// randomize which regions are used
  //		Collections.shuffle(fernNegative,rand);
  		int N = fernNegative.size();//Math.min(config.numNegativeFerns,fernNegative.size());
  
  		for( int i = 0; i < N; i++ ) {
  			fern.learnFern(false, fernNegative.get(i) );
  		}
  
  		// run detection algorithm and if there is an ambiguous solution mark it as not target
  		detection.detectionCascade(cascadeRegions);
  
  		learnAmbiguousNegative(targetRegion);
  	}
docs: Select positive and negative examples based on the region the user's initially selected region.  The selected
  region is used as a positive example while all the other regions far away are used as negative examples.
  
  @param targetRegion user selected region
  @param cascadeRegions Set of regions used by the cascade detector