Created
August 18, 2014 04:12
-
-
Save rain1024/38d012fb982597b51659 to your computer and use it in GitHub Desktop.
Sklearn
This file contains hidden or 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
import numpy as np | |
f = open("filename.txt") | |
# skip the header | |
f.readline() | |
data = np.loadtxt(f) | |
# select columns 1 through end | |
X = data[:, 1:] | |
# select column 0, the stock price | |
y = data[:, 0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment