[−][src]Trait dci::DataSet
A trait for a DataSet. The algorithm can operate over any type that implements this trait. It is highly recommended to implement this datastruct as a bit matrix, and its associated types as bitsets, in order to obtain optimal performance.
Associated Types
type ItemSet: ItemSet
The type of a itemset for this dataset.
type Cover
The type for a cover for this dataset. A cover is the set of transactions that supports an itemset. To obtain optimal performance, this should be implemented as a bitset.
Required methods
fn transactions_count(&self) -> usize
How many transactions in the dataset.
fn items_count(&self) -> usize
How many items in the dataset.
fn item_support(&self, item: usize) -> Support
Calculate the support of a given item.
fn support(&self, itemset: &Self::ItemSet) -> Support
Calculate the support of a given itemset.
fn cover(&self, itemset: &Self::ItemSet) -> Self::Cover
Calculate the cover of a given itemset.
fn supports(&self, item: usize, cover: &Self::Cover) -> bool
Check if an item supports all transactions in the given cover.
Implementors
impl<I> DataSet for Matrix<I> where
I: ItemSet,
&'a I: IntoIterator<Item = usize>,
[src]
I: ItemSet,
&'a I: IntoIterator<Item = usize>,