comparison association_rules.xml @ 0:af2624d5ab32 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ea12f973df4b97a2691d9e4ce6bf6fae59d57717"
author bgruening
date Sat, 01 May 2021 01:24:32 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:af2624d5ab32
1 <tool id="sklearn_mlxtend_association_rules" name="Association rules" version="@VERSION@">
2 <description>Extract frequent itemsets and generate association rules</description>
3 <macros>
4 <import>main_macros.xml</import>
5 </macros>
6 <expand macro="python_requirements"/>
7 <expand macro="macro_stdio"/>
8 <version_command>echo "@VERSION@"</version_command>
9 <command detect_errors="exit_code"><![CDATA[
10 python '$__tool_directory__/association_rules.py'
11 --inputs '$inputs'
12 --infile '$infile'
13 --outfile '$outfile'
14 #if $support
15 --support '$support'
16 #end if
17 #if $confidence
18 --confidence '$confidence'
19 #end if
20 #if $lift
21 --lift '$lift'
22 #end if
23 #if $conviction
24 --conviction '$conviction'
25 #end if
26 #if $length
27 --length '$length'
28 #end if
29 ]]>
30 </command>
31 <configfiles>
32 <inputs name="inputs" />
33 </configfiles>
34 <inputs>
35 <param name="infile" type="data" format="tabular" label="Input file"/>
36 <param name="header0" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Does the dataset contain header?"/>
37 <param name="support" type="float" optional="true" label="Minimum support"/>
38 <param name="confidence" type="float" optional="true" label="Minimum confidence"/>
39 <param name="lift" type="float" optional="true" label="Minimum lift"/>
40 <param name="conviction" type="float" optional="true" label="Minimum conviction"/>
41 <param name="length" type="integer" optional="true" label="Maximum length"/>
42 </inputs>
43 <outputs>
44 <data name="outfile" format="tabular"/>
45 </outputs>
46 <tests>
47 <test>
48 <param name="infile" value="mba_input_str_w.tabular" ftype="tabular"/>
49 <param name="header0" value="true"/>
50 <param name="support" value="0.5"/>
51 <param name="confidence" value="0.5"/>
52 <param name="lift" value="1.1"/>
53 <param name="conviction" value="1.1"/>
54 <param name="length" value="5"/>
55 <output name="outfile" file="mba_out_str.tabular" ftype="tabular"/>
56 </test>
57 <test>
58 <param name="infile" value="mba_input_int_w.tabular" ftype="tabular"/>
59 <param name="header0" value="true"/>
60 <param name="support" value="0.5"/>
61 <param name="confidence" value="0.5"/>
62 <param name="lift" value="1.1"/>
63 <param name="conviction" value="1.1"/>
64 <param name="length" value="5"/>
65 <output name="outfile" file="mba_output_int.tabular" ftype="tabular"/>
66 </test>
67 <test>
68 <param name="infile" value="mba_input_str_wo.tabular" ftype="tabular"/>
69 <param name="header0" value="false"/>
70 <param name="support" value="0.5"/>
71 <param name="confidence" value="0.5"/>
72 <param name="lift" value="1.1"/>
73 <param name="conviction" value="1.1"/>
74 <param name="length" value="5"/>
75 <output name="outfile" file="mba_output_str.tabular" ftype="tabular"/>
76 </test>
77 <test>
78 <param name="infile" value="mba_input_int_wo.tabular" ftype="tabular"/>
79 <param name="header0" value="false"/>
80 <param name="support" value="0.5"/>
81 <param name="confidence" value="0.5"/>
82 <param name="lift" value="1.1"/>
83 <param name="conviction" value="1.1"/>
84 <param name="length" value="5"/>
85 <output name="outfile" file="mba_output_int.tabular" ftype="tabular"/>
86 </test>
87 </tests>
88 <help><![CDATA[
89 **What it does**
90
91 Extract frequent itemsets and generate association rules
92
93 from mlxtend.frequent_patterns import fpgrowth
94
95 Extracts frequent itemsets for association rule mining. An itemset is considered as "frequent" if it
96 meets a user-specified support threshold. For instance, if the support threshold is set to 0.5 (50%),
97 a frequent itemset is defined as a set of items that occur together in at least 50% of all transactions
98 in the database. We can only get itemsets that have a maximum number of items via length input parameter.
99
100 from mlxtend.frequent_patterns import association_rules
101
102 Generates association rules from frequent itemsets. Rule generation is a common task in the mining of
103 frequent patterns. An association rule is an implication expression of the form X->Y, where X and Y
104 are disjoint itemsets. A more concrete example based on consumer behaviour would be {Diapers}->{Beer}
105 suggesting that people who buy diapers are also likely to buy beer. To evaluate the "interest" of
106 such an association rule, different metrics have been developed, e.g., confidence, lift, and conviction.
107
108 Arguments
109
110 infile: Each line in infile contains (tab-separated) items in a tranasaction. Different lines/transactions
111 can have differnt/varying number of items.
112
113 Returns
114
115 outfile: A tab separated file, that has an association rule on each line, with various metrics listed.
116
117 ]]></help>
118 <expand macro="sklearn_citation"/>
119 </tool>