Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
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
{"label":"Pylint","message":"10.00","schemaVersion":1,"color":"brightgreen"} |
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 pandas as pd | |
from datasetsforecast.m3 import M3 | |
from neuralforecast.models import NHITS | |
from neuralforecast import NeuralForecast | |
from neuralforecast.losses.pytorch import MQLoss, DistributionLoss, PMM, GMM, NBMM | |
df, _, _ = M3.load(directory='./', group='Monthly') | |
df['ds'] = pd.to_datetime(df['ds']) | |
# number of horizons |
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
from typing import List, Generator | |
import numpy as np | |
from sklearn.model_selection._split import _BaseKFold | |
from sklearn.utils.validation import indexable, _num_samples | |
class MonteCarloCV(_BaseKFold): | |
def __init__(self, |
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 | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import LogisticRegression | |
# reading the time series (pd.Series format) | |
tseries = pd.read_csv('path_to_data.csv') | |
# you can simulate some data with: | |
# tseries = pd.Series(np.random.random(100)) |
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 | |
from sklearn.neighbors import KernelDensity | |
from sklearn.base import BaseEstimator, TransformerMixin | |
from vest.preprocess.embedding import embed2seq, embed | |
class KDE(BaseEstimator, TransformerMixin): | |
""" Transformation based on Kernel Density Estimation | |
""" |