Mafia-1.4.rar

  • PUDN用户
    了解作者
  • C++
    开发工具
  • 714KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 43
    下载次数
  • 2005-09-19 02:35
    上传日期
关联规则中的频繁项集生成算法Mafia1.4版本,一个效果非常好的算法,可在linux和windows下编译运行。
Mafia-1.4.rar
  • Mafia-1.4
  • src
  • Makefile.am
    678B
  • Transaction.cpp
    5.1KB
  • TreeNode.h
    4KB
  • BaseBitmap.h
    4.9KB
  • Transaction.h
    2.8KB
  • ItemsetOutput.h
    2.2KB
  • ItemsetOutput.cpp
    3.2KB
  • Bitmap.h
    2.8KB
  • Bitmap.cpp
    8.9KB
  • BaseBitmap.cpp
    9.6KB
  • Makefile.in
    15KB
  • Tables.h
    1.8MB
  • Mafia.cpp
    43.5KB
  • docs
  • doxygen-mafia.cfg
    38.5KB
  • MafiaLogo.jpg
    82.8KB
  • html.tar.gz
    219.9KB
  • admin
  • conf.change.pl
    4.9KB
  • libtool.m4.in
    183.6KB
  • Doxyfile.am
    6.8KB
  • ylwrap
    3.9KB
  • Doxyfile.global
    36.9KB
  • debianrules
    4.7KB
  • Makefile.common
    1.1KB
  • detect-autoconf.sh
    2.2KB
  • cvs-clean.pl
    2KB
  • config.pl
    6.9KB
  • compile
    2.7KB
  • config.sub
    28.9KB
  • depcomp
    11.8KB
  • am_edit
    68.9KB
  • cvs.sh
    13.9KB
  • install-sh
    5.4KB
  • mkinstalldirs
    1.9KB
  • ChangeLog
    22.2KB
  • config.guess
    39KB
  • configure.in.min
    1.9KB
  • missing
    10KB
  • ltmain.sh
    154.9KB
  • configure.in.bot.end
    332B
  • acinclude.m4.in
    139.4KB
  • Makefile.am
    980B
  • configure.in.in
    3KB
  • acinclude.m4
    322.9KB
  • stamp-h.in
    0B
  • INSTALL
    6.8KB
  • Makefile.dist
    449B
  • config.h.in
    1.5KB
  • aclocal.m4
    38.6KB
  • mafia.lsm
    367B
  • README
    362B
  • configure.in
    3.5KB
  • Makefile.in
    20.2KB
  • stamp-h
    10B
  • mafia.kdevprj
    1.9KB
  • mafia.kdevses
    506B
  • subdirs
    4B
  • configure
    571.1KB
  • configure.files
    16B
  • www.pudn.com.txt
    218B
内容介绍
/* Copyright (c) 2003, Cornell University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Cornell University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ ///////////////////////////////////////////////////////////////////// // // Mafia.cpp // ///////////////////////////////////////////////////////////////////// //#define DEBUG #include <iostream> #include <fstream> #include <time.h> #include <stdio.h> #include <list> #include <vector> #include <algorithm rel='nofollow' onclick='return false;'> #include <string> #include <assert.h rel='nofollow' onclick='return false;'> #include <cmath> #include <map> #include "Bitmap.h" #include "TreeNode.h" #include "Transaction.h" #include "ItemsetOutput.h" using namespace std; /// @defgroup GlobalVariables Global Variables /// Global variables /** @{ */ typedef vector<TreeNode *> NodeList; typedef vector<TreeNode *> BranchList; typedef vector<Bitmap *> BitmapList; typedef vector<BaseBitmap *> BaseBitmapList; typedef vector<int> ItemSet; typedef map<long, ItemSet *> HashTable; /// Simple class for storing subtree size estimates class SubtreeEstimate { public: int Count; ///< Count of actual subtrees counted int Sum; ///< Sum of subtree sizes SubtreeEstimate () { Count = 0; Sum = 0; } }; /// Simple class for storing tail elements of each node of the tree class TailElement { public: int Count; ///< Support of the 1-extension int Item; ///< Item-id for this1 -extension TailElement () { Count = 0; Item = 0; } bool operator < (const TailElement& rhs) const { return this->Count < rhs.Count; }; }; /// @defgroup CommandLineParameters Command Line Parameters/Variables /// Commmand line parameters from user or inferred /** @{ */ string method; ///< either -mfi or -fci or -fi char* outFilename; ///< filename for output ItemsetOutput *outFile; ///< file for ouput bool outputMFI = false; ///< true if MFI should be saved to a file bool MethodIsFI = false; ///< true if the method is -fi bool MethodIsFCI = false; ///< true if the method is -fci int ItemCount; ///< # of items in the file int TransCount; ///< # of transactions in the file double MSF; ///< user-defined min sup as percentage int MS; ///< min sup as a transaction count int VerScale = 1; ///< Scaling factor for transactions int HorScale = 1; ///< Scaling factor for items bool GoFHUT = true; ///< FHUT flag bool HUTMFI = true; ///< HUTMFI flag bool PEPrune = true; ///< PEPrune flag -- parent equivalent pruning bool Reorder = true; ///< Reorder flag /** @} */ /// @defgroup CounterVariables Counter Variables /// Counter variables for information gathering /** @{ */ int CountFHUT = 0; ///< # of times FHUT was successful int CountNodes = 0; ///< # of frequent nodes in the tree int CountCounts = 0; ///< # of Counts or all nodes in the tree int CountAnds = 0; ///< # of ANDs of normal bitmaps int CountSmallAnds = 0; ///< # of compressed bitmap ANDs int CountPEPrunes = 0; ///< # of PEPruning int CountCheckPosition = 0; ///< # of CheckPosition calls int CountHUTMFI = 0; ///< # of HUTMFI attempts int CountHUTMFISuccess = 0; ///< # of HUTMFI successes int CountRebuilds; ///< # of Rebuilds /** @} */ /// @defgroup ProgramVariables Program Parameters/Variables /// Useful program parameters/counters /** @{ */ int maxtail = 0; int MFISize = 0; ///< MFI size before pruning int MFIDepth = 0; ///< The aggregated depth of the all MFI elements int F1size = 0; ///< # of frequent 1-itemsets after merging repeats int FullF1size = 0; ///< # of frequent 1-itemsets int k = 50; ///< # of items checked for a MFI lookup int MAX_compID = 1; ///< max compression ID int projectDepth = -1; ///< depth of the bitmap you're projecting from int EstimateSize; ///< size of subtree estimation buffer int EstimateDiv = 5; ///< bucket size by frequent tail length int maxItemsetSize = 0; ///< max size of a frequent itemset /** @} */ /// @defgroup DataVariables Data variables /// Complex data structure variables /** @{ */ NodeList F1; ///< List of frequent 1-itemsets BitmapList TransBuffy; ///< Buffer of transaction bitmaps BaseBitmapList NameBuffy; ///< Buffer of name bitmaps NodeList NodeBuffy; ///< Buffer of tree nodess TreeNode *Root; ///< The root (the nullset) TailElement *gTail; ///< global tail pointer TailElement *TailBuffy; ///< Common Buffer for tail elements Bitmap *NullTrans; ///< A transaction bitmap filled with ones int *ItemMap; ///< For renaming items after sorting by support int *ReverseItemMap; ///< For remembering the renaming... BaseBitmapList MFI; ///< List of Maximally Frequent Itemsets HashTable HT; ///< Hash table of transaction supports vector <int> SupportCountList; ///< List that stores support count BaseBitmap* TempName; ///< Temporary buffer for one name bitmap SubtreeEstimate* EstimateBuffy; ///< Buffer of subtree estimates int *MFIBySizes; ///< Buffer for counting MFI by itemset size int *ItemsetBuffy; ///< Buffer for writing itemsets to file output /** @} */ /// @defgroup TimingVariables Timing Variables /// Variables for timing (and instrumenting the code) /** @{ */ time_t total_start, total_finish; double total_time; time_t read_start, read_finish; double read_time; time_t algorithm_start, algorithm_finish; double algorithm_time; time_t print_start, print_finish; double print_time; /** @} */ /** @} */ /********************************************************************* Reading the data in and building the item bitmaps *********************************************************************/ /// @addtogroup InputOutput Input/Output Functions /// Reading the data in and building the item bitmaps. /// Outputting the frequent itemsets. /** @{ */ ///////////////////////////////////////////////////////////////////// /// Insert pointer to node in order of increasing support /// /// @param newNode item node to add to F1 ///////////////////////////////////////////////////////////////////// void AddToF1(TreeNode *newNode) { if (F1.empty()) F1.push_back(newNode); else { // use insertion sort for increasing support ordering NodeList::iterator nol
评论
    相关推荐
    • matlabcnhelp.rar
      matlab中文帮助很难找的,快速下载
    • MobilePolice.rar
      移动警察,车牌识别,车牌定位系统源代码,已经运用在移动车载稽查系统中。
    • SVM(matlab).rar
      支持向量机(SVM)实现的分类算法源码[matlab]
    • svm.zip
      用MATLAB编写的svm源程序,可以实现支持向量机,用于特征分类或提取
    • Classification-MatLab-Toolbox.rar
      模式识别matlab工具箱,包括SVM,ICA,PCA,NN等等模式识别算法,很有参考价值
    • VC++人脸定位实例.rar
      一个经典的人脸识别算法实例,提供人脸五官定位具体算法及两种实现流程.
    • QPSK_Simulink.rar
      QPSK的Matlab/Simulink的调制解调仿真系统,给出接收信号眼图及系统仿真误码率,包含载波恢复,匹配滤波,定时恢复等重要模块,帮助理解QPSK的系统
    • LPRBPDemo2009KV.rar
      车牌识别,神经网络算法,识别率高达95%,识别时间低于80ms。
    • MODULATION.RAR
      这个源程序代码包提供了通信系统中BPSK,QPSK,OQPSK,MSK,MSK2,GMSK,QAM,QAM16等调制解调方式 用matlab的实现,以及它们在AWGN和Rayleigh信道下的通信系统实现及误码率性能
    • algorithms.rar
      十大算法论文,包括遗传算法,模拟退火,蒙特卡罗法等等,对于初学者很有帮助!!