I have a dataset like this:
id|kurs|grade
1|c1|a
1|c2|b
2|c3|a
I want to mine association rules in such a way.If one gets a grade 'a' in 'c1',he would get 'b' in c2.This is just an example,but I want to mine association rules in such a way. I have tried the following code:
dataset=list(df.values)
te = TransactionEncoder()
te_ary = te.fit(dataset).transform(dataset)
df_encoded = pd.DataFrame(te_ary, columns=te.columns_)
df_encoded
from mlxtend.frequent_patterns import apriori
apriori(df_encoded, min_support=0.1,use_colnames=True)
I did not get the expected output.Could you throw some light on it?