blob: 0f3479d0579cc315e01f5825f2d598812b50580a [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MADlib: assoc_rules.sql_in File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script src="../mathjax/MathJax.js">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">MADlib
&#160;<span id="projectnumber">0.6</span> <span style="font-size:10pt; font-style:italic"><a href="../latest/./assoc__rules_8sql__in.html"> A newer version is available</a></span>
</div>
<div id="projectbrief">User Documentation</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="dynsections.js"></script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
initNavTree('assoc__rules_8sql__in.html','');
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">assoc_rules.sql_in File Reference</div> </div>
</div>
<div class="contents">
<p>The <a class="el" href="assoc__rules_8sql__in.html#a68a256d98b82ac15bac7df92e806f6f8">assoc_rules</a> function computes association rules for a given set of data. The data is assumed to have two dimensions; items (between which we are trying to discover associations), and a transaction id. This tranaction id groups the items by event and could also be a user id, date, etc. depending on the context of the data. This function assumes the data is stored in two columns with one transaction id and one item per row.
<a href="#details">More...</a></p>
<p><a href="assoc__rules_8sql__in_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">assoc_rules_results&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="assoc__rules_8sql__in.html#af9456adb6dad01e452415b9a0a5371dc">assoc_rules</a> (float8 support, float8 confidence, text tid_col, text item_col, text input_table, text output_schema, boolean verbose)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a68a256d98b82ac15bac7df92e806f6f8"></a><!-- doxytag: member="assoc_rules.sql_in::assoc_rules" ref="a68a256d98b82ac15bac7df92e806f6f8" args="(float8 support, float8 confidence, text tid_col, text item_col, text input_table, text output_schema)" -->
assoc_rules_results&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="assoc__rules_8sql__in.html#a68a256d98b82ac15bac7df92e806f6f8">assoc_rules</a> (float8 support, float8 confidence, text tid_col, text item_col, text input_table, text output_schema)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The short form of the above function with vobose removed. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="date"><dt><b>Date:</b></dt><dd>June 2011 August 2012</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>For a brief introduction to the association rules implementation, see the module description <a class="el" href="group__grp__assoc__rules.html">Association Rules</a>. </dd></dl>
<p>Definition in file <a class="el" href="assoc__rules_8sql__in_source.html">assoc_rules.sql_in</a>.</p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="af9456adb6dad01e452415b9a0a5371dc"></a><!-- doxytag: member="assoc_rules.sql_in::assoc_rules" ref="af9456adb6dad01e452415b9a0a5371dc" args="(float8 support, float8 confidence, text tid_col, text item_col, text input_table, text output_schema, boolean verbose)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">assoc_rules_results assoc_rules </td>
<td>(</td>
<td class="paramtype">float8&#160;</td>
<td class="paramname"><em>support</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float8&#160;</td>
<td class="paramname"><em>confidence</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>tid_col</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>item_col</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>input_table</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>output_schema</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>verbose</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">support</td><td>minimum level of support needed for each itemset to be included in result </td></tr>
<tr><td class="paramname">confidence</td><td>minimum level of confidence needed for each rule to be included in result </td></tr>
<tr><td class="paramname">tid_col</td><td>name of the column storing the transaction ids </td></tr>
<tr><td class="paramname">item_col</td><td>name of the column storing the products </td></tr>
<tr><td class="paramname">input_table</td><td>name of the table where the data is stored </td></tr>
<tr><td class="paramname">output_schema</td><td>name of the schema where the final results will be stored </td></tr>
<tr><td class="paramname">verbose</td><td>determining if output contains comments</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The schema and table name containing association rules, and total number of rules found.</dd></dl>
<p>This function computes the association rules between products in a data set. It reads the name of the table, the column names of the product and ids, and computes ssociation rules using the Apriori algorithm, and subject to the support and confidence constraints as input by the user. This version of association rules has verbose functionality. When verbose is true, output of function includes iteration steps and comments on Apriori algorithm steps. </p>
<p>Definition at line <a class="el" href="assoc__rules_8sql__in_source.html#l00293">293</a> of file <a class="el" href="assoc__rules_8sql__in_source.html">assoc_rules.sql_in</a>.</p>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="assoc__rules_8sql__in.html">assoc_rules.sql_in</a> </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<li class="footer">Generated on Tue Apr 2 2013 14:57:03 for MADlib by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
</ul>
</div>
</body>
</html>