O'Reilly logo

Java Deep Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data collection and exploratory analysis

As stated earlier, we will utilize historical stock data for training our LSTM network. The dataset has one minute OHLC data from 506 different securities for the period of January 2016 to December 2016. Let's take a look at the data we'll be using:

//DataPreview.javaSparkSession spark = SparkSession.builder().master("local").appName("StockPricePredictor").getOrCreate();spark.conf().set("spark.sql.crossJoin.enabled", "true");//enables cross joining across Spark DataFrames// load data from csv fileString filename = "data/prices-split-adjusted.csv"; Dataset<Row> data = spark.read().option("inferSchema", false).option("header", true)       .format("csv").load(filename)             .withColumn("openPrice", functions.col ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required