WeatherNextPredictor¶
- class probly.integrations.weathernext.WeatherNextPredictor(forecast_fn: Any = None, ensemble_fn: Any = None, seed: int = 0)[source]¶
Bases:
objectWraps a WeatherNext forecast function as a stochastic probly predictor.
- Parameters:
forecast_fn – Callable
(seed, *args, **kwargs) -> forecastrunning one ensemble member, whereseedis an integer to derive the member’s random key from and the returned forecast is an xarray dataset (or anything withdata_varsand array-valued variables).ensemble_fn – Optional callable
(seeds, *args, **kwargs) -> forecastrunning all members of an ensemble at once (e.g. the pmapped WeatherNext rollout), returning a forecast whose variables carry a leadingsampledimension selectable withforecast.isel(sample=...). When given, the representer prefers it overforecast_fn, and a single call returns one member with thesampledimension removed, matching the output offorecast_fn.seed – Base seed; member
iusesseed + i.
Initialize the predictor from a member and/or bulk forecast function.