Up-Down Scaling
Resampling
Each event has a different amount of point cloud lengths, making the data tensor filled with empty zeros where the point clouds are shorter. We require a static tensor with no zeros, the best way to do this is by choosing a target value—upscaling any events that are lower and downscaling any that are higher.
Bases: BaseEstimator, TransformerMixin
Parameters
target_size: (int) The number of points to up/down sample to
Returns
new_data: (array) Up/down sampled data with shape (run_events, target_size,4)
Source code in scripts/ml_preprocessing_steps.py
transform(X, y=None)
Resampling point clouds to a target value for a static array
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
tuple
|
data and event lengths np.array |
required |
y
|
None
|
Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
array
|
new data with modified shape |