get_bound_overlaps
Functions:
| Name | Description |
|---|---|
get_bound_overlaps |
Calculates the overlaps, overlap ratios, and distances between input bounds and |
Functions#
get_bound_overlaps #
get_bound_overlaps(
input_bounds: ndarray, output_bounds: ndarray
) -> tuple[
dict[int, list[int]],
dict[int, list[float]],
dict[int, list[float]],
]
Calculates the overlaps, overlap ratios, and distances between input bounds and output bounds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_bounds
|
ndarray
|
An array of shape (n, 2) representing the input bounds, where each row is [start, end]. |
required |
output_bounds
|
ndarray
|
An array of shape (m, 2) representing the output bounds, where each row is [start, end]. |
required |
Returns:
| Type | Description |
|---|---|
tuple[dict[int, list[int]], dict[int, list[float]], dict[int, list[float]]]
|
tuple[dict[int, list[int]], dict[int, list[float]]]: A tuple containing two dictionaries: - The first dictionary maps each output bin index to a list of input bin indices that overlap with it. - The second dictionary maps each output bin index to a list of ratios, representing the fraction of the input bin that is covered by the output bin. - The third dictionary maps each output bin index to a list of distances, representing the distance from the output bin center to each input bin center at least 50% covered by the output bin. |