Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions modules/cluster_estimation/cluster_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ class ClusterEstimation:
ATTRIBUTES
----------
min_activation_threshold: int
Minimum total data points before model runs.
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.
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.
Max number of real landing pads. Must be greater than 0.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency: Must be at least 1.


random_state: int
Seed for randomizer, to get consistent results.
Seed for randomizer, to get consistent results. Must be at least 0.

METHODS
-------
Expand Down Expand Up @@ -81,16 +81,16 @@ def create(
"""
Data requirement conditions for estimation model to run.
"""
# 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 <= 0:
return False, None

# This must be greater than 0
if max_num_components < 0:
if random_state < 0:
return False, None

return True, ClusterEstimation(
Expand Down
Loading