July 2017
Beginner to intermediate
715 pages
17h 3m
English
In this example, we will use Google Guava libraries, introduced in Chapter 3, Data Cleaning. The Stats class provides functionalities for handling numeric data, including finding mean and standard deviation, which we will demonstrate later. To calculate the mean, we first create a Stats object using our testData array and then execute the mean method:
Stats testStat = Stats.of(testData); double mean = testStat.mean(); out.println("The mean is " + mean);
Notice the difference between the default format of the output in this example.
Read now
Unlock full access