⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 support.html

📁 本程序是基于linux系统下c++代码
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Support Counting for 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 support {arules}"><tr><td>support {arules}</td><td align="right">R Documentation</td></tr></table>
<h2>Support Counting for Itemsets</h2>


<h3>Description</h3>

<p>
Provides the generic function and the needed S4 method to count support for
given itemsets (and other types of associations) in a given transaction
database.
</p>


<h3>Usage</h3>

<pre>
support(x, transactions, ...)
## S4 method for signature 'itemMatrix':
support(x, transactions, 
    type= c("relative", "absolute"), control = NULL)
## S4 method for signature 'associations':
support(x, transactions, 
    type= c("relative", "absolute"), control = NULL)

</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
the set of itemsets for which support should be counted. </td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further arguments are passed on. </td></tr>
<tr valign="top"><td><code>transactions</code></td>
<td>
the transaction data set used for mining. </td></tr>
<tr valign="top"><td><code>type</code></td>
<td>
a character string specifying
if <code>"relative"</code>  support or  <code>"absolute"</code>
support (counts) are returned for the itemsets in <code>x</code>. 
(default:  <code>"relative"</code>)</td></tr>
<tr valign="top"><td><code>control</code></td>
<td>
a named list with elements 
<code>method</code> indicating the method (<code>"tidlists"</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.</td></tr>
</table>

<h3>Details</h3>

<p>
Normally, itemset support is counted during mining the database
with a set minimum support. However, if only the support information 
for a single or a few itemsets is needed, one might not want to 
mine the database for all frequent itemsets.
</p>
<p>
If in control <code>method = "ptree"</code> is used, 
the counters for the itemsets are 
organized in a prefix tree. The transactions are sequencially processed
and the corresponding counters in the prefix tree are incremented 
(see Hahsler et al, 2008). This method is used by default since it is 
typically significantly faster than tid list intersection.
</p>
<p>
If in control <code>method = "tidlists"</code> is used,
support is counted using transaction ID list intersection
which is used by several fast mining algorithms
(e.g., by Eclat). However, Support is determined for each itemset
individually which is slow for a large number of long itemsets
in dense data. 
</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.
</p>


<h3>Value</h3>

<p>
A numeric vector of the same length as <code>x</code> containing
the support values for the sets in <code>x</code>.</p>

<h3>References</h3>

<p>
Michael Hahsler, Christian Buchta, and Kurt Hornik. Selective association 
rule generation. <EM>Computational Statistics</EM>, 23(2):303-315, April 2008.
</p>


<h3>See Also</h3>

<p>
<code><a href="itemMatrix-class.html">itemMatrix-class</a></code>, 
<code><a href="associations-class.html">associations-class</a></code>, 
<code><a href="transactions-class.html">transactions-class</a></code>
</p>


<h3>Examples</h3>

<pre>
data("Income")

## find and some frequent itemsets
itemsets &lt;- eclat(Income)[1:5]

## inspect the support returned by eclat
inspect(itemsets)

## count support in the database
support(items(itemsets), Income)
</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 + -