-
Notifications
You must be signed in to change notification settings - Fork 21
A ruby/c extension to Christian Borgelt's apriori item-set implementation
License
jashmenn/apriori
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
= apriori * FIX (url) == DESCRIPTION: FIX (describe your package) == FEATURES/PROBLEMS: * FIX (list of features or problems) == SYNOPSIS: FIX (code sample of usage) == REQUIREMENTS: * FIX (list of requirements) == INSTALL: * FIX (sudo gem install, anything else) == LICENSE: === Apriori C code Copyright (c) Christian Borgelt Modified and under the LGPL license. See ext/apriori/doc/copying for details. === Ruby Apriori Extension (The MIT License) Copyright (c) 2008 Nate Murray Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================================================= Apriori C code by Christian Borgelt. Taken directly from: todo, url overview: apriori/ - christian's apriori code (i'm currently debugging it for ruby purposes, but it will eventually be all the original) math/, util/ - christian's supporting code swig/ - my initial attempt at a swig wrapper, it doesnt work at all ruby/ - test/ - a "hello world" of ruby c extensions - apriori - this is where most of my work is So to try it out: cd ruby/apriori rake get_it_done This will build the extension and run the "test" Nate Murray [email protected] notes... = What options we are going to support at first: * at first, association rules :min_items -m# minimal number of items per set/rule/hyperedge (default: 1) :max_items -n# maximal number of items per set/rule/hyperedge (default: no limit) :min_support -s# minimal support of a set/rule/hyperedge (default: 10%) :max_support -S# maximal support of a set/rule/hyperedge (default: 100%) :min_confidence -c# minimal confidence of a rule/hyperedge (default: 80%) :show_absolute_support (bool) -a print absolute support (number of transactions) infile infile file to read transactions from outfile outfile file to write item sets/association rules/hyperedges to puts find_association_rules(infile, outfile, opts={}) = What options to support later: -t# target type (default: association rules) (s: item sets, c: closed item sets, m: maximal item sets, r: association rules, h: association hyperedges) -k# item separator for output (default: " ") -p# output format for support/confidence (default: "%.1f") -y print lift value (confidence divided by prior) -g write output in scanable form (quote certain characters) -q# sort items w.r.t. their frequency (default: 2) (1: ascending, -1: descending, 0: do not sort, 2: ascending, -2: descending w.r.t. transaction size sum) -b/f/r# blank characters, field and record separators (default: " \t\r", " \t", "\n") appfile file stating item appearances (optional) = What options to support even later: -e# additional evaluation measure (default: none) -! print a list of additional evaluation measures -d# minimal value of additional evaluation measure (default: 10%) -v print value of additional rule evaluation measure -l do not load transactions into memory (work on input file) -u# filter unused items from transactions (default: 0.1) (0: do not filter items w.r.t. usage in sets, <0: fraction of removed items for filtering, >0: take execution times ratio into account) -h do not organize transactions as a prefix tree -j use quicksort to sort the transactions (default: heapsort) -z minimize memory usage (default: maximize speed) -C# comment characters (default: "#") Don't even know what they do: -o use original definition of the support of a rule (body & head) -x extended support output (print both rule support types)
About
A ruby/c extension to Christian Borgelt's apriori item-set implementation
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published