Browse Source

Fill in 0.5 for undefined ratio.

When there are no calls and no smses (of a particular type), the ratio is undefined. But since their number is the same, I argue that the ratio can represent that with a 0.5, similarly to the case where no_calls_all = no_sms_all != 0.
communication
junos 10 months ago
parent
commit
e2e268148d
  1. 1
      features/communication.py

1
features/communication.py

@ -337,5 +337,6 @@ def calls_sms_features(
)
# Calculate new features and create additional columns
)
.fillna(0.5, downcast="infer")
)
return count_joined
Loading…
Cancel
Save