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

📄 affinity.html

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


<h3>Description</h3>

<p>
Provides the generic function <code>affinity</code> and the S4 methods
to compute and return a similarity matrix with the affinities between items  
for a set of <code><a href="transactions-class.html">transactions</a></code>.
</p>


<h3>Usage</h3>

<pre>
affinity(x)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
a matrix or an object of class <code>itemMatrix</code> 
or <code>transactions</code>.</td></tr>
</table>

<h3>Details</h3>

<p>
Affinity between the two items <i>i</i> and <i>j</i> is defined 
by Aggarwal et al. (2002) as
</p><p align="center"><i>A(i,j) = sup({i,j})/(sup({i}) + sup({j}) - sup({i,j})),</i></p><p>
where <i>sup(.)</i> is the support measure. This means that affinity is the 
<EM>Jaccard similarity</EM> between items.
</p>


<h3>Value</h3>

<p>
returns an object of class <code>ar_similarity</code> which represents
the affinities between items in <code>x</code>.</p>

<h3>References</h3>

<p>
Charu C. Aggarwal, Cecilia Procopiuc, and Philip S. Yu (2002)
Finding localized associations in market basket data,
<EM>IEEE Trans. on Knowledge and Data Engineering,</EM> 14(1):51&ndash;62.
</p>


<h3>See Also</h3>

<p>
<code><a href="dissimilarity.html">dissimilarity</a></code>,
<code><a href="proximity-classes.html">ar_similarity-class</a></code>,
<code><a href="itemMatrix-class.html">itemMatrix-class</a></code>
</p>


<h3>Examples</h3>

<pre>
data("Adult")

## choose a sample, calculate affinities 
s &lt;- sample(Adult, 500)
s

a &lt;- affinity(s)
summary(as.vector(a))
</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 + -