Files
drift/models/base.py
T
Mark Aron Szulyovszky fc5eba4e2d 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
2022-01-08 12:02:42 +01:00

40 lines
969 B
Python

from __future__ import annotations
from typing import Literal, Optional, Union
from abc import ABC, abstractmethod
import numpy as np
import numpy as np
class Model(ABC):
data_scaling: Literal["scaled", "unscaled"]
feature_selection: Literal["on", "off"]
# data_format: Literal["wide", "narrow"]
only_column: Optional[str]
model_type: Literal['ml', 'static']
predict_window_size: Literal['single_timestamp', 'window_size']
@abstractmethod
def fit(self, X: np.ndarray, y: np.ndarray) -> None:
raise NotImplementedError
@abstractmethod
def predict(self, X: np.ndarray) -> tuple[float, np.ndarray]:
raise NotImplementedError
@abstractmethod
def clone(self) -> Model:
raise NotImplementedError
@abstractmethod
def get_name(self) -> str:
raise NotImplementedError
@abstractmethod
def initialize_network(self, input_dim:int, output_dim:int):
pass