Coder Social home page Coder Social logo

apriori's Introduction

Apriori algorithm implementation in C

It's my data mining home work.

Getting Started

Installing

For Linux:

Just make is enough.

make

If you want debug with gdb, you can:

make debug

For Windows:

I just use x86_64-w64-mingw32-gcc to compile windows PE file on my Ubuntu:

make windows

Running the tests

./apriori test.data 2

Output:

start initialize c
End read.
Find HASH_FUNC_MOD: 5
Find MAX_LEAF_SIZE: 1
Start generate C2, spent: 0.000164s
C2 num: 10
L1 size: 5
Start count C2, spent: 0.000242s
End read.
Start generate L, spent: 0.000312s
++++++++++++++++++
14
++++++++++++++++++
3 Start apriori generation, spent: 0.000398s
Start count_C, spent: 0.000423s
End read.
End loop cycle, spent: 0.000487s
Start generate L, spent: 0.000504s
++++++++++++++++++
20
++++++++++++++++++
4 Start apriori generation, spent: 0.000566s
Start count_C, spent: 0.000581s
End read.
End loop cycle, spent: 0.000664s
Start generate L, spent: 0.000682s
++++++++++++++++++
21
++++++++++++++++++
5 Start apriori generation, spent: 0.000753s
Start count_C, spent: 0.000767s
End read.
End loop cycle, spent: 0.000823s
Total spent time, spent: 0.000839s
frq: 21

Usage

./apriori FILENAME MINSUP

Input file format

User Id Transaction length Item IDs
8 Bytes 4 Bytes Transaction length * 4 Bytes

apriori's People

Contributors

jackgrence avatar

Stargazers

杨明亮 avatar Casper avatar

Watchers

James Cloos avatar  avatar

apriori's Issues

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.