13 lines
403 B
Python
13 lines
403 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
import pandas as pd
|
|
|
|
from ml_crypto_lab.core.registry import ENSEMBLE_REGISTRY
|
|
import ml_crypto_lab.ensembles.voting # noqa: F401
|
|
|
|
|
|
def build_ensemble(method: str, prediction_frames: dict[str, pd.DataFrame], cfg: dict[str, Any] | None = None) -> pd.DataFrame:
|
|
fn = ENSEMBLE_REGISTRY.get(method)
|
|
return fn(prediction_frames, cfg or {})
|