Skip to content

Commit

Permalink
dynamic k for synth
Browse files Browse the repository at this point in the history
  • Loading branch information
howsoRes committed Jan 30, 2025
1 parent 7176324 commit 74ad0f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions howso/synthesis.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,9 @@
)
))
))

(assign (assoc regional_model_cases_map (call !Trunck (assoc local_tuple regional_model_cases_map)) ))

(assign (assoc
local_model_case_values_map
(zip
Expand Down
2 changes: 2 additions & 0 deletions howso/synthesis_utilities.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@
)
))

(assign (assoc local_model_cases_tuple (call !Trunck (assoc local_tuple local_model_cases_tuple)) ))

;if local_model_cases_tuple is too small to be viable, then remove dependent feature queries and recompute
;local_model_cases_tuple until sufficiently many cases are returned
(if action_feature_is_dependent
Expand Down
4 changes: 3 additions & 1 deletion howso/synthesis_validation.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
(query_nearest_generalized_distance
;limit the number of considered nearby neighbors by limiting the bandwidth of local minimum distance
;comparison for density-based anonymity preservation, for performance reasons.
;May be more accuraty to remove the limit of 15 in the future.
;May be more accurate to remove the limit of 15 in the future.
(min 15 (get hyperparam_map "k"))
(if has_novel_substitions non_novel_context_features context_features)
(if has_novel_substitions non_novel_context_values context_numeric_values)
Expand All @@ -195,6 +195,8 @@
)
))
))

(assign (assoc local_model_cases_tuple (call !Trunck (assoc local_tuple local_model_cases_tuple)) ))
)

;set closest case to be the one with the smallest distance
Expand Down

0 comments on commit 74ad0f7

Please sign in to comment.