foapy.characteristics.depth
depth(intervals, dtype=None)
Calculates depth of intervals.
\[ G=\sum_{i=1}^{n} \log_2 \Delta_{i} \]
where \( \Delta_{i} \) represents each interval and \( n \) is the total number of intervals.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
array_like
|
An array of intervals |
required |
|
dtype
|
The dtype of the output. |
None
|
Returns:
Type | Description |
---|---|
float
|
The depth of the input array of intervals. |
Examples:
Calculate the depth of intervals of a sequence.