Biorithm  1.1
Public Member Functions | Protected Member Functions | Protected Attributes
PosMiner Class Reference

This class takes an input stream of a matrix data file and analyzes the the independence of the columns. More...

#include <PosMiner.h>

Inheritance diagram for PosMiner:
LevelwiseMiner Miner Monitorable

List of all members.

Public Member Functions

 PosMiner (float balance=0.5, float support=1.0, unsigned int buffer_size=1000)
 PosMiner (const PosMiner &src)
virtual ~PosMiner ()
virtual PosMineroperator= (const PosMiner &rhs)

Protected Member Functions

void analyzeHelper ()
virtual bool analyzeLevel (unsigned int level)
virtual void analyzeFirstLevel ()
virtual void analyzeNewLevel (unsigned int level)
virtual void countTable (unsigned int level, unsigned int length)
virtual bool hasMatches (m_citer i, m_citer j, unsigned int level)
virtual void pruneItemSets (const vector< unsigned int > &tallies, unsigned int level)
virtual unsigned int handlePrinting (unsigned int level)
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
void setcode (const ItemSet &is, unsigned int code)
void setcode (unsigned int code)

Protected Attributes

unsigned int current
float balance
unsigned int bpreq
unsigned int bpreq2
float support
vector< ItemSetbuffer
unsigned int buffer_size
LevItemSetMap< struct passockeepSets

Detailed Description

This class takes an input stream of a matrix data file and analyzes the the independence of the columns.


Constructor & Destructor Documentation

PosMiner::PosMiner ( float  balance = 0.5,
float  support = 1.0,
unsigned int  buffer_size = 1000 
)

The Pos TruthFinder

Notes about keepSets: Each itemset has an associated value. 0: There can be no further candidates, this is definitly part of the positive border. 1: Before counting the table, there may be further derivations. After counting the table, there were no further derivations, this is a part of the positive border. 2: There was a successful derivation. This is not a part of the positive border.

Author:
Conley Owens ibcliffo@vt.edu
Date:
2007-06-21 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

PosMiner::PosMiner ( const PosMiner src)

The copy constructor

------------------------------- Parameters ------------------------------- const PosMiner& src The source Miner

PosMiner::~PosMiner ( ) [virtual]

Destructor


Member Function Documentation

void PosMiner::analyzeFirstLevel ( ) [protected, virtual]

Analyzes level one. Because we have not had candidates until this point, it has to generate the single column "combinations" for each column

void PosMiner::analyzeHelper ( ) [protected, virtual]

Analyzes the matrix, one level at a time

--------------------------------- Return --------------------------------- An error message

Reimplemented from LevelwiseMiner.

bool PosMiner::analyzeLevel ( unsigned int  level) [protected, virtual]

Analyzes a single level

------------------------------- Parameters ------------------------------- unsigned int level The current level

--------------------------------- Return --------------------------------- Whether or not we should continue (whether or not any matches were found)

Implements LevelwiseMiner.

void PosMiner::analyzeNewLevel ( unsigned int  level) [protected, virtual]

Analyzes any level other than the first one

------------------------------- Parameters ------------------------------- unsigned int level The current level

void PosMiner::countTable ( unsigned int  level,
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 LevItemSetMap<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 PosMiner::handlePrinting ( unsigned int  prevlevel) [protected, virtual]

Handle printing

------------------------------- Parameters ------------------------------- unsigned int level The current level

--------------------------------- Return --------------------------------- The level count

bool PosMiner::hasMatches ( m_citer  i,
m_citer  j,
unsigned int  level 
) [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 unsigned int level The current level

--------------------------------- Return --------------------------------- Whether or not all the matches are found

PosMiner & PosMiner::operator= ( const PosMiner rhs) [virtual]

The = operator

------------------------------- Parameters ------------------------------- const PosMiner& rhs The right hand side

--------------------------------- Return --------------------------------- A reference to the Miner

void PosMiner::pruneItemSets ( const vector< unsigned int > &  tallies,
unsigned int  level 
) [protected, virtual]

Prunes out itemsets based on bitpattern counts

------------------------------- Parameters ------------------------------- vector<ItemSet*>& buffer The buffer of ItemSets that we are evaluating LevItemSetMap& result The table to store all the succeeding combimations in const vector<vector<unsigned int> >& tallies) The tally sheet of bitpattern counts unsigned int level The current level


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Friends