from abc import abstractmethod
import pandas as pd
import numpy as np
from typing import Tuple, Dict, Literal, Optional

class BaseModel():
    """
    所有模型的基础接口，定义 fit/predict/evaluate 方法。
    """

    @abstractmethod
    def fit(self, X: pd.DataFrame, y: pd.Series) -> None:
        pass

    @abstractmethod
    def predict(self, X: pd.DataFrame) -> np.ndarray:
        pass

    @abstractmethod
    def evaluate(self, X: pd.DataFrame, y: pd.Series) -> Dict[str, float]:
        pass