Java summary statistics
Java can produce summary statistics for a collection. We can retrieve the Iris dataset and put it into a collection before producing the statistics directly.
I have copied the file from http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data to make the processing a little smoother.
We read in the Iris data and then call upon collections to produce a summary.
The code for this example is as follows:
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Iris {
public Iris(Double sepalLength, Double sepalWidth, Double
petalLength, Double petalWidth, String irisClass) {
this.sepalLength = sepalLength;
this.sepalWidth...