diff --git a/modules/cluster_estimation/cluster_estimation.py b/modules/cluster_estimation/cluster_estimation.py index ba5e80fb..2169db1a 100644 --- a/modules/cluster_estimation/cluster_estimation.py +++ b/modules/cluster_estimation/cluster_estimation.py @@ -20,20 +20,6 @@ class ClusterEstimation: works by predicting 'cluster centres' from groups of closely placed landing pad detections. - ATTRIBUTES - ---------- - min_activation_threshold: int - Minimum total data points before model runs. - - min_new_points_to_run: int - Minimum number of new data points that must be collected before running model. - - max_num_components: int - Max number of real landing pads. - - random_state: int - Seed for randomizer, to get consistent results. - METHODS ------- run() @@ -80,17 +66,35 @@ def create( ) -> "tuple[bool, ClusterEstimation | None]": """ Data requirement conditions for estimation model to run. + + PARAMETERS: + min_activation_threshold: int + Minimum total data points before model runs. Must be at least 1. + + min_new_points_to_run: int + Minimum number of new data points that must be collected before running model. Must be at least 0. + + max_num_components: int + Max number of real landing pads. Must be at least 1. + + random_state: int + Seed for randomizer, to get consistent results. Must be at least 0. + + local_logger: logger.Logger + The local logger to log this object's information. + + RETURNS: The ClusterEstimation object if all conditions pass, otherwise False, None """ - # These parameters must be positive - if min_new_points_to_run < 0 or random_state < 0: + if min_activation_threshold < 1: return False, None - # At least 1 point for model to fit - if min_activation_threshold < 1: + if min_new_points_to_run < 0: + return False, None + + if max_num_components < 1: return False, None - # This must be greater than 0 - if max_num_components < 0: + if random_state < 0: return False, None return True, ClusterEstimation(