-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add data transformation to new_feature_template #252
Conversation
@@ -0,0 +1,119 @@ | |||
target_feature_value <- params$added_feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are used throughout all the other docs, without being explicitly mentioned in the others.
select( | ||
meta_pin, meta_card_num, pred_card_shap_baseline_fmv, | ||
{{ target_feature_value }} | ||
) %>% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renames the value to append _shap, allowing the feature value to be merged without creating .x, .y.
) | ||
|
||
# Summarizing data by neighborhood code | ||
card_nbhd <- card_individual %>% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are mostly used for the ggplots for neighborhood mapping.
) %>% | ||
ungroup() %>% | ||
right_join(pin_individual, by = c("meta_pin" = "meta_pin")) %>% | ||
mutate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes the dollar::scales before dividing by it.
This refactors the previous data transformation into five specific objectives.
Key changes
-The wonkiest part of this is the leaflet map, which pivots wider based on the different SHAP values. For example, if a pin has 4 cards, it has value_1, value_2 ,etc. allowing the leaflet map to display the individual value for each card, while plotting based on pin.
#250