hoi.utils.landscape — HOI 0.0.5 documentation (original) (raw)
hoi.utils.landscape#
hoi.utils.landscape(x, mult_size, n_bins=100, centered=False, stat='probability', output='numpy')[source]#
Compute the landscape from HOI values.
The landscape represents the how estimates of HOI are distributed per order.
Parameters:
xarray_like
Array of data containing the HOI estimates of shape (n_hoi,)
multi_sizearray_like
Size of the multiplet associated to each HOI estimates. It should be an array of shape (n_hoi,)
n_binsarray_like | 100
Number of bins to use to build the histogram at each order
centeredbool | False
Specify whether bin edges should be centered around zero
stat{‘probability’, ‘frequency’, ‘count’, ‘density’, ‘percent’}
Aggregate statistic to compute in each bin.
- count: show the number of observations in each bin
- frequency: show the number of observations divided by the bin width
- probability or proportion: normalize such that bar heights sum to 1
- percent: normalize such that bar heights sum to 100
- density: normalize such that the total area of the histogram equals 1
output{‘numpy’, ‘pandas’, ‘xarray’} | None
Output type. Use either :
- ‘numpy’: in that case this function will returns the landscape, the unique orders (x-axis) and the central bins (y-axis)
- ‘pandas’: 2-dimensional pandas dataframe
- ‘xarray’: 2-dimensional dataarray
Returns:
landcapearray_like
Returns depend on the output parameter. Check to see what is returned