Safe Haskell | Safe-Infered |
---|
- type Transaction a = Set a
- type Items a = Set a
- class (Ord a, NFData a) => Item a
- rules :: (Item a, Foldable container) => container (Transaction a) -> Items a -> (Map (Items a) Int -> Map (Items a) Int) -> Map (Items a, Items a) Double
- loadDataSet :: String -> IO [Transaction Int]
- top :: Item a => ([(Items a, Int)] -> [(Items a, Int)]) -> Map (Items a) Int -> Map (Items a) Int
- test :: IO [((Items Int, Items Int), Double)]
Documentation
type Transaction a = Set aSource
:: (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