|
Biorithm
1.1
|
This class takes an input stream of a matrix data file and analyzes the the independence of the columns. More...
#include <TreeMiner.h>
Public Member Functions | |
| TreeMiner (float balance=0.5, float support=1.0, unsigned int buffer_size=1000) | |
| TreeMiner (const TreeMiner &src) | |
| virtual | ~TreeMiner () |
| virtual TreeMiner & | operator= (const TreeMiner &rhs) |
Protected Member Functions | |
| void | analyzeHelper () |
| virtual bool | analyzeLevel (unsigned int level) |
| virtual void | countTable (unsigned int length) |
| virtual void | pruneItemSets (const vector< unsigned int > &tallies, unsigned int length) |
| virtual unsigned int | handlePrinting () |
| virtual unsigned int | generateCandidates (atree::ConstIterator &iter, atree::ConstIterator &jter) |
| virtual bool | hasMatches (const ItemSet &i, const ItemSet &j) const |
| virtual struct assoc | getval (const ItemSet &is) const |
| virtual void | setcode (const ItemSet &is, int code) |
| virtual void | setcode (int code) |
| virtual void | analyzeItemSet (const ItemSet &is, const ItemSet &ispos, const ItemSet &isneg, unsigned int &penalty, unsigned int &success) const |
| virtual void | analyzeItemSet (const ItemSet &is, unsigned int &penalty, unsigned int &success) const |
| int | gensupp (const ItemSet &ispos, const ItemSet &isneg, unsigned int start) const |
Protected Attributes | |
| float | balance |
| unsigned int | bpreq |
| unsigned int | bpreq2 |
| float | support |
| vector< ItemSet * > | buffer |
| unsigned int | buffer_size |
| atree | tree |
| unsigned int | current |
| unsigned int | level |
| unsigned int | level1pos |
This class takes an input stream of a matrix data file and analyzes the the independence of the columns.
| TreeMiner::TreeMiner | ( | float | balance = 0.5, |
| float | support = 1.0, |
||
| unsigned int | buffer_size = 1000 |
||
| ) |
Reads in the column names and sets variables needed for grabbing rows in the future
------------------------------- Parameters ------------------------------- float balance The minimum fraction of rows that must comprise a bitpattern float support The fraction of bitpatterns that have to succeed at each level unsigned int buffer_size the amount of combinations allowed to sit in the queue at once
| TreeMiner::TreeMiner | ( | const TreeMiner & | src | ) |
| TreeMiner::~TreeMiner | ( | ) | [virtual] |
Destructor
| void TreeMiner::analyzeHelper | ( | ) | [protected, virtual] |
Analyzes the matrix, one level at a time
--------------------------------- Return --------------------------------- An error message
Reimplemented from LevelwiseMiner.
| bool TreeMiner::analyzeLevel | ( | unsigned int | level | ) | [protected, virtual] |
Analyzes any level other than the first one
------------------------------- Parameters ------------------------------- unsigned int level The current level
Implements LevelwiseMiner.
| void TreeMiner::countTable | ( | unsigned int | length | ) | [protected, virtual] |
Counts out the truth tables at this level, given a set of column combinations
------------------------------- Parameters ------------------------------- vector<ItemSet*>& buffer The buffer of ItemSets that we need to analyze ItemSetTree<struct assoc>& result The table to store all the succeeding combimations in unsigned int level The current level unsigned int length The number of combinations sitting in the buffer
| unsigned int TreeMiner::generateCandidates | ( | atree::ConstIterator & | iter, |
| atree::ConstIterator & | jter | ||
| ) | [protected, virtual] |
Generates candidates
------------------------------- Parameters ------------------------------- ItemSetTree<struct assoc>::Iterator& iter The iterator
--------------------------------- Return --------------------------------- The number of candidates generated
| unsigned int TreeMiner::handlePrinting | ( | ) | [protected, virtual] |
Handle printing
--------------------------------- Return --------------------------------- The level count
| bool TreeMiner::hasMatches | ( | const ItemSet & | i, |
| const ItemSet & | j | ||
| ) | const [protected, virtual] |
At this point we have found two matching sets (Two sets of width w, where only one element differs in each) Now we need to see if the other elements exist
------------------------------- Parameters ------------------------------- const ItemSet& i The first item set const ItemSet& j The second item set
--------------------------------- Return --------------------------------- Whether or not all the matches are found
| void TreeMiner::pruneItemSets | ( | const vector< unsigned int > & | tallies, |
| unsigned int | length | ||
| ) | [protected, virtual] |
Prunes out itemsets based on bitpattern counts
------------------------------- Parameters ------------------------------- vector<ItemSet*>& buffer The buffer of ItemSets that we are evaluating ItemSetTree& result The table to store all the succeeding combimations in const vector<vector<unsigned int> >& tallies) The tally sheet of bitpattern counts
1.7.6.1