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
# Loading the packages | |
import pandas as pd | |
from statsmodels.tsa.statespace.sarimax import SARIMAX | |
# Loading the data | |
data = pd.read_csv('https://raw.githubusercontent.com/jbrownlee/Datasets/master/airline-passengers.csv') | |
# Setting the month as index | |
data = data.set_index('Month') |
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
# Loading the packages | |
import pandas as pd | |
import numpy as np | |
import statsmodels.tsa.stattools as sm | |
import matplotlib.pyplot as plt | |
plt.style.use('fivethirtyeight') | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) |
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
# Loading the packages | |
import pandas as pd | |
import pmdarima | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) | |
data = data.set_index('Month') | |
# Conducting PP test: |
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
# Loading the packages | |
import pandas as pd | |
import numpy as np | |
import statsmodels.tsa.stattools as sm | |
import matplotlib.pyplot as plt | |
plt.style.use('fivethirtyeight') | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) |
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
# Loading the packages | |
import pandas as pd | |
import pmdarima | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) | |
data = data.set_index('Month') | |
# Conducting OCSB test: |
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
# Loading the packages | |
import pandas as pd | |
from statsmodels.tsa.seasonal import seasonal_decompose | |
import matplotlib.pyplot as plt | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) | |
data = data.set_index('Month') |
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
# Loading the packages | |
import pandas as pd | |
from statsmodels.graphics import tsaplots | |
plt.style.use('fivethirtyeight') | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) | |
data = data.set_index('Month') |
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
# Loading the packages | |
import pandas as pd | |
import pmdarima | |
# Loading the dataset: | |
data = pd.read_csv('../AirPassengers.csv') | |
data = data.rename(columns = {'#Passengers':'Passengers'}) | |
data = data.set_index('Month') | |
# Conducting CH test: |
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
# Importing the Packages: | |
import optuna | |
import pandas as pd | |
from sklearn import linear_model | |
from sklearn import ensemble | |
from sklearn import datasets | |
from sklearn import model_selection | |
#Grabbing a sklearn Classification dataset: | |
X,y = datasets.load_breast_cancer(return_X_y=True, as_frame=True) |
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
# Getting the best trial: | |
print(f"The best trial is : \n{study.best_trial}") | |
# >> Output: | |
#The best trial is : | |
#FrozenTrial(number=18, value=0.9631114824097281, datetime_start=datetime.datetime(2020, 8, 16, 14, 24, 37, 407344), datetime_complete=datetime.datetime(2020, 8, 16, 14, 24, 37, 675114), params={'classifier': 'RandomForest', 'rf_n_estimators': 153, 'rf_max_depth': 21}, | |
#distributions={'classifier': CategoricalDistribution(choices=('LogReg', 'RandomForest')), 'rf_n_estimators': IntUniformDistribution(high=1000, low=10, step=1), 'rf_max_depth': IntLogUniformDistribution(high=32, low=2, step=1)}, user_attrs={}, system_attrs={}, intermediate_values={}, trial_id=18, state=TrialState.COMPLETE) | |
# Getting the best score: | |
print(f"The best value is : \n{study.best_value}") | |
# >> Output: |
OlderNewer