Last active
July 27, 2019 13:09
-
-
Save atriptoparadise/1778285a349f1c83d33873d5ae767abc to your computer and use it in GitHub Desktop.
Data Preparation
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
y = data.dropna().y | |
X = data.dropna().drop(['y'], axis=1) | |
# Reserve 30% of data for testing | |
X_train, X_test, y_train, y_test = timeseries_train_test_split(X, y, test_size=0.3) | |
X_train_scaled = scaler.fit_transform(X_train) | |
X_test_scaled = scaler.transform(X_test) | |
# Linear Regression | |
lr = LinearRegression() | |
lr.fit(X_train_scaled, y_train) | |
plotModelResults(lr, X_train_scaled, X_test_scaled, plot_intervals=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment