-
-
Save rickyhai11/627d0da8bc93615785382b249618f43b to your computer and use it in GitHub Desktop.
main class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object SparkLSTM { | |
def main(args: Array[String])= { | |
if (args.length == 2) { | |
val filePath = args(0) //"/Users/kym1992/STUDY/NEU/CSYE7200/Dataset/nyse/prices-split-adjusted.csv" | |
val symbolName = args(1) | |
BasicConfigurator.configure() | |
val prepared = StockPricePredictionLSTM.prepare(filePath, symbolName, 0.90) | |
val result = StockPricePredictionLSTM.predictPriceOneAhead(prepared._1, prepared._2, prepared._3, prepared._4, prepared._5) | |
println("predicts, actual") | |
(result.predicts, result.actuals).zipped.foreach((x, y) => println(x + ", " + y)) | |
saveAsCsv(result, symbolName) | |
result.predicts.foreach(r => println(r)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment