File size: 269 Bytes
bdec51c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from typing import Protocol, TypeVar
X = TypeVar("X")
Y = TypeVar("Y")
class FitPredictor(Protocol[X, Y]):
def fit(self, x: X, y: Y) -> "FitPredictor":
...
def predict(self, x: X) -> Y:
...
def predict_proba(self, x: X) -> Y:
...
|