Skip to main content

markov_model

Transaction-level attribution with Markov models can be performed with function markov_model.

Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
Datadata.frame/strdata.frame or a file address where customer journeys are stored
var_pathstrname of the column containing paths
var_convstrname of the column containing total conversions
var_valuestrNonename of the column containing total conversion value
var_nullstrNonename of the column containing total paths that do not lead to conversion
row_sepstr","if Data is a file address then row _sep is the line separator
cha_sepstr">"separator between channels
typestr"odds"type of quantity used for attribution. It can be equal to "re" (removal effect), "cr" (conversion rate), "odds" (classical odds), "diff_odds" (differential odds) or "exp_odds" (exponential odds)
orderint1Markov model order
nsim_startint1e5minimum number of simulations to be used in computation
max_stepintNonemaximum number of length for a single simulated path
ncoreint1number of threads to be used in computation
nfoldint10how many repetitions to be used to verify if convergence has been reached at each iteration
seedint1234567random seed. Giving this parameter the same value over different runs guarantees that results will not vary
conv_pardouble0.05convergence parameter for the algorithm. The estimation process ends when the percentage of variation of the results over different repetions is less than convergence parameter
rate_step_simdouble1.5number of simulations used at each iteration is equal to the number of simulations used at previous iteration multiplied by rate_step_sim
verboseboolTrueif True, additional information during the execution will be shown
flg_out_tran_mtxint0if 1, transition matrix along with attribution is computed and returned. If 2, only transition matrix is computed and returned
file_outputstrNonefile address where path attribution will be written
flg_write_nullsboolTrueIf True then non converting paths will be returned in path attribution output
flg_write_pathsboolFalseIf True then paths will be returned in the path attribution output
serverstr"app.channelattribution.io"address of the server where password will be checked to authorize the execution of the function
passwordstrNoneuser

Output

OUTPUTTYPEDESCRIPTION
parametersdata.frameparameters for transaction-level attribution
attributiondata.framepath-level attribution
transition_matrixdata.frametransition matrix built from paths belonging to Data