FIM Algorithms package for ARM
Project description
How to Install
pip install FIMProject
How to Use It
from FIM import FIMAlgorithms
ap = Apriori(DATABASE, SingleItems, 2)
freq = ap.findFrequentItems()
ap.showFrequentItems()
ap.showRules(0.9, 0.4)
What is DATABASE and SingleItems?
The database consisting of string items is represented as a binary database as can be seen in the figure. There are as many columns as the number of single items. If there is an item in the line, it is represented by "1", otherwise it is represented by "0". The reason we keep the database as a binary database is that it is more costly to calculate over strings. All algorithms in this library work on this type of database.
Index | String Transaction | Indices Transaction |
---|---|---|
0 | ['A' 'B' 'E' 'G'] | [1 1 0 0 1 0 1] |
1 | ['B' 'C' 'E' 'F'] | [0 1 1 0 1 1 0] |
2 | ['A' 'E' 'F'] | [1 0 0 0 1 1 0] |
3 | ['B' 'F' 'G'] | [0 1 0 0 0 1 1] |
4 | ['A' 'B' 'D' 'E'] | [1 1 0 1 1 0 0] |
5 | ['A' 'F' 'G'] | [1 0 0 0 0 1 1] |
6 | ['A' 'B' 'D' 'E' 'F' 'G'] | [1 1 0 1 1 1 1] |
7 | ['A' 'B' 'E' 'F'] | [1 1 0 0 1 1 0] |
8 | ['B' 'C' 'D' 'F'] | [0 1 1 1 0 1 0] |
9 | ['A' 'E' 'F' 'G'] | [1 0 0 0 1 1 1] |
10 | ['B' 'D' 'E' 'F'] | [0 1 0 1 1 1 0] |
SingleItems is a list of single items in the database. The reason why we keep this list is to show the results found in string type.
SingleItems | ["A","B","C","D","E","F","G"] |
---|
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
FIMProject-0.0.3.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for FIMProject-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fd974b3c91393c9d90c3d289efd17c54021d082374f4f3b2cbbfeaf403209ab |
|
MD5 | b6c6a3c7a10ab8e888c4c3b45653d4df |
|
BLAKE2b-256 | 754fea66a18d5b293d0a74c78294d7ce8ac8c3a7035335e62be64b79730825d4 |