src.pydasa.elements.specs.statistical ===================================== .. py:module:: src.pydasa.elements.specs.statistical .. autoapi-nested-parse:: Module statistical.py =========================================== Statistical perspective for variable representation. This module defines the StatisticalSpecs class representing the probabilistic distribution and sampling properties of a variable. Classes: **StatisticalSpecs**: Statistical variable specifications *IMPORTANT:* Based on the theory from: # H.Gorter, *Dimensionalanalyse: Eine Theoririe der physikalischen Dimensionen mit Anwendungen* Classes ------- .. autoapisummary:: src.pydasa.elements.specs.statistical.StatisticalSpecs Module Contents --------------- .. py:class:: StatisticalSpecs Statistical perspective: probabilistic distributions. Answers the question: "How do we MODEL uncertainty?" This perspective focuses on: - Probability distribution types (uniform, normal, beta, custom) - Distribution parameters - Random sampling mechanisms - Monte Carlo simulation support - Uncertainty quantification .. py:attribute:: _sym :type: str .. py:attribute:: _dist_type :type: str :value: 'uniform' Type of distribution (e.g., 'uniform', 'normal'). By default is 'uniform'. .. py:attribute:: _dist_params :type: Optional[Dict[str, Any]] 1} for uniform). :type: Parameters for the distribution (e.g., {'min' :type: 0, 'max' .. py:attribute:: _depends :type: List[str] :value: [] List of variable names that this variable depends on. (e.g., for calculated variables like F = m*a). .. py:attribute:: _dist_func :type: Optional[Callable[Ellipsis, float]] :value: None Callable representing the distribution function defined externally by the user. .. py:method:: sample(*args) *sample()* Generate a random sample. :param \*args: Additional arguments for the distribution function. :returns: Random sample from distribution. :rtype: float :raises ValueError: If no distribution has been set. .. py:method:: has_function() *has_function()* Check if distribution is set. :returns: True if distribution is configured. :rtype: bool .. py:property:: dist_type :type: str *dist_type* Get the distribution type. :returns: Distribution type (e.g., 'uniform', 'normal'). :rtype: str .. py:property:: dist_params :type: Optional[Dict[str, Any]] *dist_params* Get the distribution parameters. :returns: Distribution parameters. :rtype: Optional[Dict[str, Any] .. py:property:: dist_func :type: Optional[Callable[Ellipsis, float]] *dist_func* Get the distribution function. :returns: Distribution function. :rtype: Optional[Callable] .. py:property:: depends :type: List[str] *depends* Get the list of variable dependencies. :returns: List of variable names that this variable depends on. :rtype: List[str] .. py:method:: clear() *clear()* Reset statistical attributes to default values. Resets distribution type, parameters, and function.