Skip to content

Commit

Permalink
added check verifying max_num_components > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
lilywang899 committed Dec 23, 2024
1 parent 6114540 commit af1146b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/cluster_estimation/cluster_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ class ClusterEstimation:
__MEAN_PRECISION_PRIOR = 1e-6
__MAX_MODEL_ITERATIONS = 1000

# # Real-world scenario Hyperparameters
# __MAX_NUM_COMPONENTS = 10 # assumed maximum number of real landing pads

# Hyperparameters to clean up model outputs
__WEIGHT_DROP_THRESHOLD = 0.1
__MAX_COVARIANCE_THRESHOLD = 10
Expand All @@ -92,6 +89,10 @@ def create(
if min_activation_threshold < 1:
return False, None

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

return True, ClusterEstimation(
cls.__create_key,
min_activation_threshold,
Expand Down

0 comments on commit af1146b

Please sign in to comment.