BaseEstimator¶
The abstract base class defining the estimator interface.
Overview¶
All estimators in Falcon must implement this interface. The base class defines methods for:
- Runtime wiring (
setup) - Training (
train) - Sampling (
sample_prior,sample_posterior,sample_proposal) - Persistence (
save,load) - Control flow (
interrupt)
Class Reference¶
BaseEstimator
¶
Bases: ABC
Fully abstract base class defining the estimator interface.
Subclasses implement a two-phase lifecycle:
-
__init__: pure config storage — stores all parameters as instance attributes. Defaults live here; nothing runtime is wired up. -
setup(): load-bearing runtime wiring — called byNodeWrapperinside a Ray actor before training begins. Applies any flat YAML overrides (configdict), then initialises networks, devices, and all runtime objects.
Example::
graph.add_node("z", estimator=Flow(max_epochs=300, net_type="nsf"))
setup
abstractmethod
¶
Wire up runtime components.
Called by NodeWrapper before training.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
simulator_instance
|
Live prior/simulator, already constructed. |
required | |
theta_key
|
Optional[str]
|
Name of the parameter node being estimated. |
required |
condition_keys
|
List of evidence/scaffold node names. |
required |