Last active
February 2, 2018 13:44
-
-
Save RedaAffane/0c41ed9a93c5b715d02ca960aec8955b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, let's convert the dataframe "subsets_conversions" into a dictionnary | |
C_values = user_logs_aggr.set_index("channels").to_dict()["conversions"] | |
#For each possible combination of channels A, we compute the total number of conversions yielded by every subset of A. | |
# Example : if A = {c1,c2}, then v(A) = C({c1}) + C({c2}) + C({c1,c2}) | |
v_values = {} | |
for A in subsets(channels): | |
v_values[A] = v_function(A,C_values) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment