{ } Raw JSON

bundles / scipy latest / scipy / stats / _distribution_infrastructure / _Parameter

ABCMeta

scipy.stats._distribution_infrastructure:_Parameter

source: /scipy/stats/_distribution_infrastructure.py :558

Signature

def   _Parameter ( name * domain symbol = None typical = None )

Members

Summary

Representation of a distribution parameter or variable.

Extended Summary

A _Parameter object is responsible for storing information about a parameter or variable, providing input validation/standardization of values passed for that parameter, providing a text/mathematical representation of the parameter for the documentation (__str__), and drawing random values of itself for testing and benchmarking. It does not provide a complete implementation of this functionality and is meant for subclassing.

Attributes

name : str

The keyword used to pass numerical values of the parameter into the initializer of the distribution

symbol : str

The text representation of the variable in the documentation. May include LaTeX.

domain : _Domain

The domain of the parameter for which the distribution is valid.

typical : 2-tuple of floats or strings (consider making a _Domain)

Defines the endpoints of a typical range of values of the parameter. Used for sampling.

Methods

__str__():

Returns a string description of the variable for use in documentation, including the keyword used to represent it in code, the symbol used to represent it mathemtatically, and a description of the valid domain.

draw(size, *, rng, domain, proportions)

Draws random values of the parameter. Proportions of values within the valid domain, on the endpoints of the domain, outside the domain, and having value NaN are specified by proportions.

validate(x):

Validates and standardizes the argument for use as numerical values of the parameter.

Aliases

  • scipy.stats._distribution_infrastructure._Parameter