We are using another time series use case, but this time we are targeting time series univariate sequence classification. ETL needs to be discussed before we configure the LSTM neural network. Data extraction is the first phase in the ETL process. This recipe covers data extraction for this use case.
Extracting time series data
How to do it...
- Categorize the sequence data programmatically:
// convert URI to string
final String data = IOUtils.toString(new URL(url),"utf-8");
// Get sequences from the raw data
final String[] sequences = data.split("\n");
final List<Pair<String,Integer>> contentAndLabels = new ArrayList<>();
int lineCount = 0;
for(String sequence : sequences) {
// Record...