voiage.schema.ParameterSet
Container for parameter samples from a probabilistic sensitivity analysis.
Attributes
Section titled “Attributes”frame : pl.DataFrame
Wide Polars frame with one Float64 column per parameter in declared
order. Column names are the parameter names. Sample count is the frame
height.
Examples
Section titled “Examples”>>> import numpy as np >>> from voiage.schema import ParameterSet >>> params = ParameterSet.from_numpy_or_dict({“cost”: np.array([1.0, 2.0])}) >>> params.parameter_names [‘cost’]
Methods
Section titled “Methods”from_polars
Section titled “from_polars”from_polars([positional or keyword] cls: None = None, [positional or keyword] frame: pl.DataFrame = None) -> ParameterSetCreate a ParameterSet from a wide Polars frame.
Parameters:
clsframepl.DataFrame
Returns: ParameterSet
to_polars
Section titled “to_polars”to_polars([positional or keyword] self: ParameterSet = None) -> pl.DataFrameReturn a deep copy of the wide Polars frame.
Parameters:
selfParameterSet
Returns: pl.DataFrame
copy([positional or keyword] self: ParameterSet = None) -> ParameterSetReturn a deep copy of the ParameterSet.
Parameters:
selfParameterSet
Returns: ParameterSet
subset_by_parameters
Section titled “subset_by_parameters”subset_by_parameters([positional or keyword] self: ParameterSet = None, [positional or keyword] parameter_names: Sequence[str] = None) -> ParameterSetReturn a new ParameterSet containing only the requested parameters.
Parameters:
selfParameterSetparameter_namesSequence[str]
Returns: ParameterSet
from_numpy_or_dict
Section titled “from_numpy_or_dict”from_numpy_or_dict([positional or keyword] cls: None = None, [positional or keyword] parameters: np.ndarray | dict[str, np.ndarray] | JaxArray | dict[str, JaxArray] = None) -> ParameterSetCreate a ParameterSet from a numpy/JAX array or dictionary.
Args: parameters: Either a 2D array of shape (n_samples, n_parameters) or a dictionary mapping parameter names to 1D arrays. Supports both NumPy and JAX arrays.
Returns
Section titled “Returns”ParameterSet: A new ParameterSet instance
Parameters:
clsparametersnp.ndarray | dict[str, np.ndarray] | JaxArray | dict[str, JaxArray]
Returns: ParameterSet
from_jax
Section titled “from_jax”from_jax([positional or keyword] cls: None = None, [positional or keyword] parameters: JaxArray | dict[str, JaxArray] = None) -> ParameterSetCreate a ParameterSet from a JAX array or dictionary.
Args: parameters: Either a 2D JAX array of shape (n_samples, n_parameters) or a dictionary mapping parameter names to 1D JAX arrays
Returns
Section titled “Returns”ParameterSet: A new ParameterSet instance
Parameters:
clsparametersJaxArray | dict[str, JaxArray]
Returns: ParameterSet