Class04 Answer:

Add syntax to get GSPC prices from

This was an easy lab.

/* ~/sparkapps/logr10/logr12c.scala
This script should download prices and predict daily direction of GSPC.
It should generate a label which I assume to be dependent on price calculations.
A label should classify an observation as down or up. Down is 0.0, up is 1.0.
It should generate independent features from slopes of moving averages of prices.
It should create a Logistic Regression model from many years of features.
spark-shell -i logr12c.scala

import org.apache.spark.sql.SQLContext
import{Vector, Vectors}
import org.apache.spark.sql.Row
import sys.process._

// I should get prices:
"/usr/bin/curl -L -o /tmp/gspc.csv"!


Class04 Lab About Blog Contact Class01 Class02 Class03 Class04 Class05 Class06 Class07 Class08 Class09 Class10 dan101 Forum Google Hangout Vboxen