Skip to content
Draft
Show file tree
Hide file tree
Changes from 7 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
56 changes: 56 additions & 0 deletions howso/attribute_maps.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,62 @@
)
)

(if (> (call !GetNumTrainingCases) 0)
(seq
(if (contains_index bounds_map "min")
(if
(<
(retrieve_from_entity
(first (contained_entities (list
Copy link
Member

@howsoRes howsoRes Aug 8, 2024

Choose a reason for hiding this comment

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

change this code and the one below to be:

(first (contained_entities
    (list (query_exists feature) (query_min feature 1))
))

(query_exists feature)
(query_min feature 1)
)))
feature
)
(or
;use the epoch value if this is a datetime feature
(get bounds_map "epoch_min_value")
(get bounds_map "min")
)
)
(accum (assoc
warnings
(associate (concat
"There is at least one case with a value less than the minimum value set in the feature bounds for feature: "
feature ". Please consider editing any out-of-bounds cases or updating the bounds by updating the feature attributes."
))
))
)
)

(if (contains_index bounds_map "max")
(if
(>
(retrieve_from_entity
(first (contained_entities (list
(query_exists feature)
(query_max feature 1)
)))
feature
)
(or
;use the epoch value if this is a datetime feature
(get bounds_map "epoch_max_value")
(get bounds_map "max")
)
)
(accum (assoc
warnings
(associate (concat
"There is at least one case with a value greater than the maximum value set in the feature bounds for feature: "
feature ". Please consider editing any out-of-bounds cases or updating the bounds by updating the feature attributes."
))
))
)
)
)
)

;bounds map contains the min and max from 'bounds' and allow_null parameters
(append
bounds_map
Expand Down
7 changes: 6 additions & 1 deletion howso/attributes.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@
continuous_to_nominal_dependents_map (null)
nominal_to_nominal_dependents_map (null)
novel_substition_feature_set (null)

warnings (assoc)
))

(call !UpdateAttributesForDateTimeDataTypes)
Expand Down Expand Up @@ -536,7 +538,10 @@

(accum_to_entities trainee (assoc !revision 1))

(call !Return (assoc payload !featureAttributes))
(call !Return (assoc
warnings (if (size warnings) (indices warnings))
payload !featureAttributes
))
)

#!ComposeCustomDerivedMethods
Expand Down
Loading