Reclassifying Labels
Reclassifying Labels
For classification ML models, the labels begin with 0, for our data that would represent 0 number of tracks. For this reason though the experimental labels begin with 1, we subtract 1 from them for ML purposes.
Bases: BaseEstimator, TransformerMixin
Parameters
None
Return
X_copy: (np.array) Labels recalculated but the same data shape remains same (run_events, target_size,4)
Source code in scripts/ml_preprocessing_steps.py
transform(X, y=None)
Reclassifying the labels from number of tracks to classes by subtracting 1
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
array
|
data array with shape (run_events, target_size,4) |
required |
y
|
None
|
Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
array
|
reclassified data labels |