November 2018
Intermediate to advanced
300 pages
7h 42m
English
We have to download the time series data from https://solarscience.msfc.nasa.gov/greenwch/spot_num.txt and save the file in the data folder. In the .java file, we will specify the file path, and then we will indicate the format of the file using the following code block:
File filename = new File("data/spot_num.txt");CSVFormat format = new CSVFormat('.', ' ');VersatileDataSource source = new CSVDataSource(filename, true, format);VersatileMLDataSet data = new VersatileMLDataSet(source);data.getNormHelper().setFormat(format);ColumnDefinition columnSSN = data.defineSourceColumn("SSN", ColumnType.continuous);ColumnDefinition columnDEV = data.defineSourceColumn("DEV", ColumnType.continuous);data.analyze();data.defineInput(columnSSN); ...