I am designing Java programs for data mining/machine learning applications. Can anyone tell me should I use double or float for importing the data?
What is the convention?
Thanks a lot!;)
Printable View
I am designing Java programs for data mining/machine learning applications. Can anyone tell me should I use double or float for importing the data?
What is the convention?
Thanks a lot!;)
Hey, I dont think there is any convention. You should just look of how much precision you need the system to have. Double would give you the largest precision.(Largest amount of numbers)
hi tyang
float or double got different precision,one is smaller another one is bigger.
you can take this code to see exactly how it is working there:
the result is :Code:public class DoubleAndFloat {
public static void main(String[] args) {
System.out.println( Double.MAX_VALUE);
System.out.println( Float.MAX_VALUE);
}
}
so, to choose double or float is depending on the bussiness which you are mining on.Code:1.7976931348623157E308
3.4028235E38
actually float is big enough in most of the time, i personal feel.
good luck