asethi1 / charts4j

Automatically exported from code.google.com/p/charts4j
Other
0 stars 0 forks source link

Data scaling should be able to handle NaNs #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
      Vector<Float> dataSet = new Vector<Float>();
      dataSet.add(new Float(123));
      dataSet.add(new Float(456));
      dataSet.add(Float.NaN);
      dataSet.add(789f);
            // legal
      Data d1 = Data.newData(dataSet);
      System.out.println(d1);
            // illegal
      Data d2 = DataUtil.scale(dataSet);
      System.out.println(d2);

Original issue reported on code.google.com by Julien.C...@gmail.com on 20 May 2009 at 5:04

GoogleCodeExporter commented 8 years ago
I guess missing value should also during scaling be represented by NaN, no? I 
also
wouldn't mind if null would serve as a missing value indicator - in DataUtil 
and in Data.

In case new Double(-1) is also used as missing value indicator I would remove 
it.

Original comment by Dieter.K...@googlemail.com on 20 May 2009 at 9:39