📄 ruleinduction.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Rule Induction for a Set of Itemsets</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>
<table width="100%" summary="page for ruleInduction {arules}"><tr><td>ruleInduction {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Rule Induction for a Set of Itemsets</h2>
<h3>Description</h3>
<p>
Provides the generic function and the needed S4 method to
induce all rules which can be generated by the given itemsets
from a transactions data set.
</p>
<h3>Usage</h3>
<pre>
ruleInduction(x, ...)
## S4 method for signature 'itemsets':
ruleInduction(x, transactions, confidence = 0.8,
control = NULL)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
the set of itemsets from which rules will be induced. </td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further arguments. </td></tr>
<tr valign="top"><td><code>transactions</code></td>
<td>
the transaction data set used to mine
the itemsets. </td></tr>
<tr valign="top"><td><code>confidence</code></td>
<td>
a numeric value giving the minimum confidence for the
rules. </td></tr>
<tr valign="top"><td><code>control</code></td>
<td>
a named list with elements
<code>method</code> indicating the method (<code>"apriori"</code> or <code>"ptree"</code>),
and the logical arguments <code>reduce</code> and
<code>verbose</code> to indicate if unused items are removed and if
the output should be verbose.
Currently, <code>"ptree"</code> is the default method.</td></tr>
</table>
<h3>Details</h3>
<p>
If in control <code>method = "apriori"</code> is used, a very simple rule
induction method is used. All rules are mined from the transactions
data set using Apriori with the minimal support found in itemsets.
And in a second step all rules which do not stem from one of the
itemsets are removed. This procedure will be in many cases very slow
(e.g., for itemsets with many elements or very low support).
</p>
<p>
If in control <code>method = "ptree"</code> is used, the transactions are
counted into a prefix tree and then the rules are selectively generated
using the counts in the tree. This is usually faster than the above
approach.
</p>
<p>
If in control <code>reduce = TRUE</code> is used, unused items are removed
from the data before creating rules. This might be slower for large
transaction data sets. However, if <code>method = "ptree"</code> this is
highly recommended as the items are further reorderd to reduce the
counting time.
</p>
<p>
If argument <code>transactions</code> is missing it is assumed that <code>x</code>
contains a lattice (complete set) of frequent itemsets together with
their support counts. Then rules can be induced directly without
support counting. This approach is very fast.
</p>
<h3>Value</h3>
<p>
An object of class <code>rules</code>.</p>
<h3>See Also</h3>
<p>
<code><a href="itemsets-class.html">itemsets-class</a></code>, <code><a href="rules-class.html">rules-class</a></code>
<code><a href="transactions-class.html">transactions-class</a></code>
</p>
<h3>Examples</h3>
<pre>
data("Adult")
## find all closed frequent itemsets
closed <- apriori(Adult,
parameter = list(target = "closed", support = 0.4))
## rule induction
rules <- ruleInduction(closed, Adult, control = list(verbose = TRUE))
summary(rules)
## inspect the resulting rules
inspect(SORT(rules, by = "lift")[1:5])
## use lattice of frequent itemsets
ec <- eclat(Adult, parameter = list(support = 0.4))
rec <- ruleInduction(ec)
inspect(rec[1:5])
</pre>
<hr><div align="center">[Package <em>arules</em> version 0.6-6 <a href="00Index.html">Index]</a></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -