fit_sequential

fit_sequential(model, data, *, features=None, dynamic_kwargs=None, **kwargs)[source]

Sequentially fits sub-modules of a circuit using either optimization or sampling.

For each network in the network collection, the network’s name is used as a prefix for the features to fit, and pmrf.fit.fit() is called.

Parameters:
  • model (Model) – The global circuit model.

  • data (NetworkCollection) – A collection of network data whose names are used as prefixes for sub-model features.

  • features (EvaluatorLike | dict | None, default=None) – The circuit feature(s) to evaluate for each sub-model. If None, defers to the backend’s defaults.

  • dynamic_kwargs (dict[str, dict | Callable[[skrf.Network], Any]] | None, default=None) – A mapping of keyword arguments that should be resolved dynamically per network. If a value is a dict, it is resolved using the network name as the key. If a value is a callable, it is resolved by passing the network to the callable.

  • **kwargs (dict) – Standard static kwargs passed directly to the underlying sequential fitters for all iterations.

Returns:

The fully updated global Model, and a dictionary of localized results.

Return type:

tuple[Model, dict[str, OptimizeResult | InferenceResult]]