hepstats.hypotests.parameters module#

Module defining the parameter of interest classes, currently includes:

  • POIarray

  • POI

class hepstats.hypotests.parameters.POIarray(parameter, values)[source]#

Bases: object

Class for parameters of interest with multiple values:

Parameters:
  • parameter – the parameter of interest

  • values (Collection | np.array) – values of the parameter of interest

Raises:
  • ValueError – if is_valid_parameter(parameter) returns False

  • TypeError – if parameter is not an iterable

Example with zfit:
>>> Nsig = zfit.Parameter("Nsig")
>>> poi = POIarray(Nsig, value=np.linspace(0,10,10))
property values#

Returns the values of the POIarray.

property ndim#

Returns the number of dimension of the POIarray.

property shape#

Returns the shape of the POIarray.

append(values)[source]#

Append values in the POIarray.

Parameters:

values (int | float | Collection | ndarray) – values to append

class hepstats.hypotests.parameters.POI(parameter, value)[source]#

Bases: POIarray

Class for single value parameter of interest:

Parameters:
  • parameter – the parameter of interest

  • values – value of the parameter of interest

Raises:

TypeError – if value is an iterable

Example with zfit:
>>> Nsig = zfit.Parameter("Nsig")
>>> poi = POI(Nsig, value=0)
property value#

Returns the value of the POI.

append(values)#

Append values in the POIarray.

Parameters:

values (int | float | Collection | ndarray) – values to append

property ndim#

Returns the number of dimension of the POIarray.

property shape#

Returns the shape of the POIarray.

property values#

Returns the values of the POIarray.

hepstats.hypotests.parameters.asarray(poi)[source]#

Transforms a POI instance into a POIarray instance.

Parameters:

poi (POI) – the parameter of interest.

Return type:

POIarray