You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
438 B
16 lines
438 B
6 years ago
|
from models import AnalyticUnitCache
|
||
6 years ago
|
from abc import ABC, abstractmethod
|
||
|
from pandas import DataFrame
|
||
6 years ago
|
from typing import Optional
|
||
6 years ago
|
|
||
|
|
||
|
class Detector(ABC):
|
||
|
|
||
|
@abstractmethod
|
||
6 years ago
|
async def train(self, dataframe: DataFrame, segments: list, cache: Optional[AnalyticUnitCache]) -> AnalyticUnitCache:
|
||
6 years ago
|
pass
|
||
|
|
||
|
@abstractmethod
|
||
6 years ago
|
async def predict(self, dataframe: DataFrame, cache: Optional[AnalyticUnitCache]) -> dict:
|
||
6 years ago
|
pass
|