score_rule | R Documentation |
Mine herb-herb association rules of prescription using the Apriori algorithm.
score_rule(BasicData, drug = NULL, support = 0.1, confidence = 0.8)
BasicData |
BasicData object. |
drug |
Charactor vector of drug names to analyze, default to |
support |
A numeric value for the minimal support of an item set, default to 0.1. |
confidence |
A numeric value for the minimal confidence of an item set, default to 0.8. |
A HerbResult object.
Yuanlong Hu
## Not run: data(drugdemo) drug_herb <- PrepareData(drugdemo$drug_herb, from = "drug", to="herb") herb_compound <- PrepareData(drugdemo$herb_compound, from = "herb", to="compound") compound_target <- PrepareData(drugdemo$compound_target, from = "compound", to="target") disease <- PrepareData(drugdemo$disease, diseaseID = "disease",from = "target", to="target") BasicData <- CreateBasicData(drug_herb, herb_compound, compound_target, diseasenet = disease) res <- score_rule(BasicData, support = 0.1,confidence = 0.8) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.