multirectilinear
deepdrivewe.binners.multirectilinear ¶
Multirectilinear binner.
MultiRectilinearBinner ¶
Bases: Binner
Multirectilinear binner for multiple progress coordinates.
Source code in deepdrivewe/binners/multirectilinear.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
__init__ ¶
__init__(
bins: list[ndarray | list[float]],
bin_target_counts: int | list[int],
target_state_inds: int | list[int] | None = None,
) -> None
Initialize the binner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bins
|
list[ndarray | list[float]]
|
The bin edges for the progress coordinates. |
required |
bin_target_counts
|
int | list[int]
|
The target counts for each bin. If an integer is provided, the target counts are assumed to be the same for each bin. |
required |
target_state_inds
|
int | list[int] | None
|
The index of the target state. If an integer is provided, then there is only one target state. If a list of integers is provided, then there are multiple target states. If None is provided, then there are no target states. Default is None. |
None
|
Source code in deepdrivewe/binners/multirectilinear.py
assign_bins ¶
Bin the progress coordinate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pcoords
|
ndarray
|
The progress coordinates to bin. Shape: (n_simulations, n_dims). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The bin assignments for each simulation. Shape: (n_simulations,) |