Skip to main content

compare_models

Compare the performance of first touch, last touch, linear touch, Markov model, Shapley value and logistic regression in a simulated traffic allocation problem based on real data.

Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
df_pathsdata.framedata.frame including customer journeys
var_pathstrNonename of the column containing paths
var_convstrNonename of the column containing total conversions
var_nullstrNonename of the column containing total paths that do not lead to conversion
cha_sepstr">"separator between channels
channel_conv_namestrNonehow conversion state is identified in df_paths
df_ctrdata.frameNonedata.frame with click-through rates for channels expressed in number of clicks
perc_realldouble0.10Percentage of traffic to reallocate
perc_sampledouble0.10Percentage of sampled customer journeys
max_nsimint10000Maximum number of sampled customer journeys
min_perc_trafficdouble0.005Minimum percentage of traffic equally split among each channel
niterint10Number of iterations
flg_extra_pathbool1If = 1, extra paths will be added to Data
max_markov_orderint3all the Markov models of order <= max_markov_order will be computed
seedint1234567random seed
verboseint1If = 1, some information is printed during the execution
serverstr"app.channelattribution.io"address of the server where password will be checked to authorize the execution of the function
passwordstrNoneuser

Output

OUTPUTTYPEDESCRIPTION
performancedata.frameperformance in term of conversion rate reached by each attribution model
allocationdata.frametraffic allocation suggested by each attribution model