Files
drift/models/base.py
T
Mark Aron Szulyovszky 8dd2d88740 chore(Linter): reformatted code with black (#211)
* chore(Linter): reformatted code with black

* Create black.yaml
2022-02-17 19:22:17 +01:00

25 lines
665 B
Python

from __future__ import annotations
from typing import Literal, Optional, Union
from abc import ABC, abstractmethod
import numpy as np
class Model(ABC):
name: str = ""
data_transformation: Literal["transformed", "original"]
only_column: Optional[str]
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) -> np.ndarray:
raise NotImplementedError
@abstractmethod
def predict_proba(self, X: np.ndarray) -> np.ndarray:
raise NotImplementedError