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
Year | Number of Cases | |
---|---|---|
1974 | 30122 | |
1975 | 33989 | |
1976 | 32105 | |
1977 | 30145 | |
1978 | 28521 | |
1979 | 27669 | |
1980 | 27749 | |
1981 | 27373 | |
1982 | 25520 |
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 argparse | |
import numpy as np | |
import pmdarima as pm | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from scipy.stats import t | |
def auto_arima(in_csv_file_path): | |
print('IN File==>' + in_csv_file_path) | |
df = pd.read_csv(in_csv_file_path, header=0, infer_datetime_format=True, parse_dates=[0], index_col=[0]) |
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 pandas as pd | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import LinearRegression | |
import matplotlib.pyplot as plt | |
df = pd.read_csv('uciml_auto_city_highway_mpg.csv', header=0) | |
#Plot the original data set | |
df.plot.scatter(x='City MPG', y='Highway MPG') | |
plt.show() |
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
City MPG | Highway MPG | |
---|---|---|
21 | 27 | |
21 | 27 | |
19 | 26 | |
24 | 30 | |
18 | 22 | |
19 | 25 | |
19 | 25 | |
19 | 25 | |
17 | 20 |
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 matplotlib.pyplot as plt | |
import pandas as pd | |
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf | |
import seaborn as sns | |
df = pd.read_csv('boston_monthly_tmax_1998_2019.csv', header=0, infer_datetime_format=True, parse_dates=[0], index_col=[0]) | |
df.plot(marker='.') | |
plt.show() |
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 pandas as pd | |
from sklearn import linear_model | |
#Read the data into a pandas DataFrame | |
df = pd.read_csv('southern_osc.csv', header=0, infer_datetime_format=True, parse_dates=[0], index_col=[0]) | |
#add two columns containing the LAG=1 and LAG=2 version of the data to the DataFrame | |
df['T_(i-1)'] = df['T_i'].shift(1) | |
df['T_(i-2)'] = df['T_i'].shift(2) |
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
Date | Monthly Average Maximum | |
---|---|---|
1/15/1998 | 39.71 | |
2/15/1998 | 40.97 | |
3/15/1998 | 48.75 | |
4/15/1998 | 56.74 | |
5/15/1998 | 68.75 | |
6/15/1998 | 72 | |
7/15/1998 | 82.62 | |
8/15/1998 | 80.2 | |
9/15/1998 | 74.44 |
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 random | |
import math | |
_lambda = 5 | |
_num_arrivals = 100 | |
_arrival_time = 0 | |
print('RAND,INTER_ARRV_T,ARRV_T') | |
for i in range(_num_arrivals): |
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 random | |
import math | |
_lambda = 5 | |
_num_total_arrivals = 150 | |
_num_arrivals = 0 | |
_arrival_time = 0 | |
_num_arrivals_in_unit_time = [] | |
_time_tick = 1 |
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
Date | Closing Price | |
---|---|---|
7/24/2019 | 27269.9707 | |
7/25/2019 | 27140.98047 | |
7/26/2019 | 27192.44922 | |
7/29/2019 | 27221.34961 | |
7/30/2019 | 27198.01953 | |
7/31/2019 | 26864.26953 | |
8/1/2019 | 26583.41992 | |
8/2/2019 | 26485.00977 | |
8/5/2019 | 25717.74023 |
OlderNewer