feat(Models): added lightGBM, moved other models to separate files (#128)

* feat(Models): added lightGBM, moved other models to separate files

* feat(Models): added non-working statsmodel wrapper

* fix(Models): added work-in-progress comment to StatsModels
This commit is contained in:
Mark Aron Szulyovszky
2022-01-08 12:02:42 +01:00
committed by GitHub
parent 6982187872
commit fc5eba4e2d
12 changed files with 165 additions and 73 deletions
-26
View File
@@ -1,26 +0,0 @@
import os
import pandas as pd
import torch
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
import numpy as np
class TimeSeriesDataset(Dataset):
def __init__(self, X: np.ndarray, y: np.ndarray):
self.X = X
self.y = y
def __len__(self):
return len(self.X)
def __getitem__(self, idx):
return self.X[idx].astype(float), self.y[idx].astype(float)
def get_dataloader(X: np.ndarray, y: np.ndarray, batch_size: int = 32, shuffle: bool = True):
training_data = TimeSeriesDataset(X, y)
train_dataloader = DataLoader(training_data, batch_size=batch_size, shuffle=shuffle)
return train_dataloader