Coder Social home page Coder Social logo

fp-growth-in-python's Introduction

#FP-Growth coded with python2.7# FP-Growth is one of the most classical algorithms in the association analysis.And this repository is one implementation of the FP-Growth with python language.

##Contents:##

  • FP_Growth
    • _init_.py
    • tree_builder.py
    • tree_building.py
    • tree_miner.py

"**\__init__.py**":This file is calling the other files to build the FP-Tree and to mine frequent itemsets on FP_Tree.And also,we are inputting transaction datasets and setting the minimum support count here.

"tree_builder.py":This file is responsible for processing the transaction datasets and calling "tree_building.py" to build the FP_Tree.

"tree_building.py":This file is responsible for building the FP_Tree.

"tree_miner.py":This file is used to mine the frequent itemsets based on the FP_Tree.



##Result:## If the transaction datasets and min_sup that we input in "\__init__.py" like this: ``` ...... routines = [ ['Cola','Egg','Ham'], ['Cola','Diaper','Beer'], ['Cola','Beer','Diaper','Ham'], ['Diaper','Beer'] ] # transaction datasets min_sup = 2 # the minimum support count ...... ```
Then,the result will be: ``` ('Diaper', 'Beer') : 3 ('Cola', 'Ham') : 2 ('Beer', 'Diaper', 'Cola') : 2 ('Diaper', 'Cola') : 2 ('Beer', 'Cola') : 2

<br>
<br>
#####You can see more Chinese explanation here:http://blog.csdn.net/bone_ace/article/details/46746727

fp-growth-in-python's People

Contributors

bone-ace avatar liuxingming avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.