score_rule {immcp}R Documentation

Mining herb-herb associations with Apriori

Description

Mine herb-herb association rules of prescription using the Apriori algorithm.

Usage

score_rule(BasicData, drug = NULL, support = 0.1, confidence = 0.8)

Arguments

BasicData

BasicData object.

drug

Charactor vector of drug names to analyze, default to NULL.

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.

Value

A HerbResult object.

Author(s)

Yuanlong Hu

Examples

## 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)

[Package immcp version 1.0.3 Index]