mardi 29 mars 2016

Sequantial pattern mining(cspade) using some transaction data

It is a problem for Sequantial pattern mining(cspade) using transaction data. Target for sequential pattern mining is sequenceID, eventID and item variables with crime_ dat data frame.

So, source dataset is in this format.

sequenceID eventID item
    1         1     A
    1         2     B
    1         3     A    

Before, I solved the problem using split function for association problem because using read.transactions func. is not reasonable for this case. # of split variable was just 2.

However, it is 3 for sequential pattern mining problem.

Can you give me some advaice to solve this?

Actually, I used this sentence to solve the problem using split function. Finally, it showed error.

 crime.trans <- as(setNames(split(crime_dat, seq(nrow(crime_dat))), rownames(crime_dat))
 + ,"transactions");
 ===> Error in split.default(crime_dat, seq(nrow(crime_dat))) : 
group length is 0, but data lenth is larger than 0

Aucun commentaire:

Enregistrer un commentaire