Description Usage Arguments Value Examples
This function is the main function of this package. The objective is to provide a clustering of the 80 campaigns that we have on our dataset. The specification of this algorithm is that we can have longitudinal data, i.e n observations for a single campaign.
1 |
formula |
A formula or Character which links target variable and predictor variables |
var_weights |
A character value corresponding to the weights variable |
K |
A numeric value representing the number of clusters chosen for the mixture |
df |
A dataframe to cluster |
col_id |
A character value (colname) corresponding to the id column name |
a summary list of EM algorithm results : loglikelihood, beta/lambda/tau estimation at each iteration, bic/icl value,number of fisher iteration at each EM iteration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Load data :
data(adcampaign)
## Run mixture :
## Not run:
result_mixture<-runEM(formula="ctr~timeSlot",
var_weights="impressions",
K=2,
df=adcampaign,
col_id="id")
## Analysis of results :
plot(result_mixture[[1]],type="l") #gives you the loglikelihood evolution
# list of the estimated parameter for each cluster for each iteration :
result_mixture[[2]]
# list of the estimated parameter for each cluster for each iteration
result_mixture[[3]] #list of ids proportion in each cluster for each iteration
#list of matrices containing probability to be in cluster k for each id :
result_mixture[[4]]
# BIC value :
result_mixture[[5]]
# ICL value :
result_mixture[[6]]
# list of number fisher scoring iterations for each iteration
result_mixture[[7]]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.