Created
August 6, 2019 17:13
-
-
Save marcopeix/653a549cc6761d357248f90893c53222 to your computer and use it in GitHub Desktop.
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
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
sns.set() | |
from sklearn.metrics import r2_score, median_absolute_error, mean_absolute_error | |
from sklearn.metrics import median_absolute_error, mean_squared_error, mean_squared_log_error | |
from scipy.optimize import minimize | |
import statsmodels.tsa.api as smt | |
import statsmodels.api as sm | |
from tqdm import tqdm_notebook | |
from itertools import product | |
def mean_absolute_percentage_error(y_true, y_pred): | |
return np.mean(np.abs((y_true - y_pred) / y_true)) * 100 | |
import warnings | |
warnings.filterwarnings('ignore') | |
%matplotlib inline | |
DATAPATH = 'data/stock_prices_sample.csv' | |
data = pd.read_csv(DATAPATH, index_col=['DATE'], parse_dates=['DATE']) | |
data.head(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment