-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase_teacher.py
36 lines (30 loc) · 980 Bytes
/
base_teacher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from abc import ABC, abstractmethod
class BaseTeacher(ABC):
"""Abstract method for teacher"""
@abstractmethod
def __init__(self, *args, **kwargs):
pass
@abstractmethod
def fit(self, *args, **kwargs):
"""this function should fit the model and be enough to evaluate the model"""
pass
@abstractmethod
def get_defer_preds(self, data_x, ai_info=None):
""" "
Args:
data_x: 2d numpy array of the features
ai_info: 2d numpy array of the AI information
Returns:
defer_preds: 1d numpy array of the defer predictions
"""
pass
@abstractmethod
def get_region_labels(self, data_x, ai_info=None):
""" "
Args:
data_x: 2d numpy array of the features
ai_info: 2d numpy array of the AI information
Returns:
data_region_labeling: 1d numpy array of the data region labeling
"""
pass