hinduce-associations-apriori-0.0.0.0: Apriori algorithm for association rule mining

Safe HaskellSafe-Infered

Data.HInduce.Associations.Apriori

Synopsis

Documentation

type Items a = Set aSource

class (Ord a, NFData a) => Item a Source

Instances

rulesSource

Arguments

:: (Item a, Foldable container) 
=> container (Transaction a)

all transactions

-> Items a

the items that you are interested in

-> (Map (Items a) Int -> Map (Items a) Int)

a function which can filter itemsets from depending on the support

-> Map (Items a, Items a) Double

the tuple represents a rule, the double represents the confidence in that rule [0,1]

Given transactions on items, derive rules for items

loadDataSet :: String -> IO [Transaction Int]Source

Load a dataset from a file, where each line represents one transaction

top :: Item a => ([(Items a, Int)] -> [(Items a, Int)]) -> Map (Items a) Int -> Map (Items a) IntSource