Normalization

Can be done using the filter classes for normalization.

  1. /* Create data set with random instances */
  2. Dataset data=new DefaultDataset();
  3. for(int i=0;i<100;i++){
  4. Instance rgA=InstanceTools.randomInstance(5);
  5. data.add(rgA);
  6. }
  7. NormalizeMidrange nmr=new NormalizeMidrange(0.5,1);
  8. /* Instanciate new filter */
  9. nmr.build(data);
  10.  
  11. Instance rgB=InstanceTools.randomInstance(5);
  12. /* Filter another instances */
  13. nmr.filter(rgB);