voiage.fluent.FluentDecisionAnalysis
A class to represent a decision analysis problem with fluent API support.
Methods
Section titled “Methods”with_parameters
Section titled “with_parameters”with_parameters([positional or keyword] self: None = None, [positional or keyword] parameter_samples: np.ndarray | ParameterSet | dict[str, np.ndarray] = None) -> FluentDecisionAnalysisSet parameter samples for the analysis.
Args: parameter_samples: Parameter samples for EVPPI calculation
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfparameter_samplesnp.ndarray | ParameterSet | dict[str, np.ndarray]
Returns: FluentDecisionAnalysis
with_backend
Section titled “with_backend”with_backend([positional or keyword] self: None = None, [positional or keyword] backend: str = None) -> FluentDecisionAnalysisSet the computational backend.
Args: backend: Backend name (‘numpy’, ‘jax’, etc.)
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfbackendstr
Returns: FluentDecisionAnalysis
with_jit
Section titled “with_jit”with_jit([positional or keyword] self: None = None, [positional or keyword] use_jit: bool = True) -> FluentDecisionAnalysisEnable or disable JIT compilation.
Args: use_jit: Whether to use JIT compilation
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfuse_jitbool(default:True)
Returns: FluentDecisionAnalysis
with_streaming
Section titled “with_streaming”with_streaming([positional or keyword] self: None = None, [positional or keyword] window_size: int = None) -> FluentDecisionAnalysisEnable streaming data support with specified window size.
Args: window_size: Size of the streaming window
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfwindow_sizeint
Returns: FluentDecisionAnalysis
with_caching
Section titled “with_caching”with_caching([positional or keyword] self: None = None, [positional or keyword] enable: bool = True) -> FluentDecisionAnalysisEnable or disable caching.
Args: enable: Whether to enable caching
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfenablebool(default:True)
Returns: FluentDecisionAnalysis
add_data
Section titled “add_data”add_data([positional or keyword] self: None = None, [positional or keyword] new_nb_data: np.ndarray | ValueArray = None, [positional or keyword] new_parameter_samples: np.ndarray | ParameterSet | dict[str, np.ndarray] | None = None) -> FluentDecisionAnalysisAdd new data to the analysis (for streaming support).
Args: new_nb_data: New net benefit data to add new_parameter_samples: New parameter samples corresponding to the net benefit data
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfnew_nb_datanp.ndarray | ValueArraynew_parameter_samplesnp.ndarray | ParameterSet | dict[str, np.ndarray] | None(default:None)
Returns: FluentDecisionAnalysis
calculate_evpi
Section titled “calculate_evpi”calculate_evpi([positional or keyword] self: None = None, [positional or keyword] population: float | None = None, [positional or keyword] time_horizon: float | None = None, [positional or keyword] discount_rate: float | None = None, [positional or keyword] chunk_size: int | None = None) -> FluentDecisionAnalysisCalculate the Expected Value of Perfect Information (EVPI).
Args: population: The relevant population size time_horizon: The relevant time horizon in years discount_rate: The annual discount rate chunk_size: Size of chunks for incremental computation
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfpopulationfloat | None(default:None)time_horizonfloat | None(default:None)discount_ratefloat | None(default:None)chunk_sizeint | None(default:None)
Returns: FluentDecisionAnalysis
calculate_evppi
Section titled “calculate_evppi”calculate_evppi([positional or keyword] self: None = None, [positional or keyword] population: float | None = None, [positional or keyword] time_horizon: float | None = None, [positional or keyword] discount_rate: float | None = None, [positional or keyword] n_regression_samples: int | None = None, [positional or keyword] regression_model: RegressionModelProtocol | type[RegressionModelProtocol] | None = None, [positional or keyword] chunk_size: int | None = None) -> FluentDecisionAnalysisCalculate the Expected Value of Partial Perfect Information (EVPPI).
Args: population: Population size for scaling time_horizon: Time horizon for scaling discount_rate: Discount rate for scaling n_regression_samples: Number of samples to use for fitting the regression model regression_model: An unfitted scikit-learn compatible regression model chunk_size: Size of chunks for incremental computation
Returns
Section titled “Returns”FluentDecisionAnalysis: Self for method chaining
Parameters:
selfpopulationfloat | None(default:None)time_horizonfloat | None(default:None)discount_ratefloat | None(default:None)n_regression_samplesint | None(default:None)regression_modelRegressionModelProtocol | type[RegressionModelProtocol] | None(default:None)chunk_sizeint | None(default:None)
Returns: FluentDecisionAnalysis
get_evpi_result
Section titled “get_evpi_result”get_evpi_result([positional or keyword] self: None = None) -> float | NoneGet the last calculated EVPI result.
Returns
Section titled “Returns”Optional[float]: Last EVPI result or None if not calculated
Parameters:
self
Returns: float | None
get_evppi_result
Section titled “get_evppi_result”get_evppi_result([positional or keyword] self: None = None) -> float | NoneGet the last calculated EVPPI result.
Returns
Section titled “Returns”Optional[float]: Last EVPPI result or None if not calculated
Parameters:
self
Returns: float | None
get_results
Section titled “get_results”get_results([positional or keyword] self: None = None) -> dict[str, float | None]Get all calculated results.
Returns
Section titled “Returns”Dict[str, Optional[float]]: Dictionary of results
Parameters:
self
Returns: dict[str, float | None]