Loading/selecting data
First we need to load raw data into our Java environment. Data can be stored in a variety of data sources, from text files to structured database systems. One basic and simple type used is CSV (Comma-Separated Values), which is simple and in general use. In addition, we'll need to transform this data and perform selection before presenting it to the neural network.
Building auxiliary classes
To deal with these tasks, we need some auxiliary classes in the package edu.packt.neuralnet.data
. The first will be LoadCsv
to read CSV files:
public class LoadCsv { //Path and file name separated for compatibility private String PATH; private String FILE_NAME; private double[][] dataMatrix; private boolean columnsInFirstRow=false; private ...
Get Deep Learning: Practical Neural Networks with Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.