How to Use the APriori Algorithm on a Twitter Data Collection?

Dear all, I have collected a dataset from Twitter and would like to use the APriori algorithm to infer whether a transaction—a “tweet”—contains a signal of pharmacovigilance, that is, it may be an Adverse Drug Reaction.

This Twitter dataset has several columns, but I believe the information for inference should be only in the “tweet” column, which is the text typed by a user. It will likely contain the name of a migraine medication and perhaps a symptom, a complaint from the user, or something similar. With this information, is it possible to use this “APriori Association Rule” in Knime? How?

Here is an example of my data:

Thank you!

Hi @Perciliano -

I don’t know that association rules are what you want here. They are more typically used in market basket analysis - “this person bought a toothbrush, so based on other people’s purchases we could recommend them toothpaste”.

If you approach this as a classification problem, you could label tweets as having adverse drug reactions or not, then train a model based on the labeled tweets.

1 Like

Hi @ScottF ok, thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.