Open AKuederle opened 1 month ago
I saw that at least in one of the algorithms implemented here (https://github.com/mad-lab-fau/eargait/blob/ffd83365ae3cd4351c53ff7b93d92da9a33ffb7e/eargait/gait_sequence_detection/gait_sequence_detector.py#L93), have a bunch of loading in the __init__. This is discuraged in the context of tpcp/sklearn and similar frameworks, as the idea is that parameters can be modified even after the init (using set_params) and the assumption is that creating an instance is "cheap" and it is hence done under the hood often (e.g. via .clone).
__init__
set_params
.clone
All logic should be put where it is first needed (aka in detect or train method)
Here as well: https://github.com/mad-lab-fau/eargait/blob/ffd83365ae3cd4351c53ff7b93d92da9a33ffb7e/eargait/event_detection/mixed_event_detection.py#L78
I saw that at least in one of the algorithms implemented here (https://github.com/mad-lab-fau/eargait/blob/ffd83365ae3cd4351c53ff7b93d92da9a33ffb7e/eargait/gait_sequence_detection/gait_sequence_detector.py#L93), have a bunch of loading in the
__init__
. This is discuraged in the context of tpcp/sklearn and similar frameworks, as the idea is that parameters can be modified even after the init (usingset_params
) and the assumption is that creating an instance is "cheap" and it is hence done under the hood often (e.g. via.clone
).All logic should be put where it is first needed (aka in detect or train method)