apprecom
Version:
Location based app recommendation system.
616 lines (178 loc) • 7.79 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: AppRecom</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: AppRecom</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>AppRecom<span class="signature">(debug)</span><span class="type-signature"></span></h2>
<div class="class-description"><p>AppRecom is a tool for getting app recommendations based on a user's location.</p>
<p>
The two primary methods in this class are:
<ol>
<li>train()</li>
<li>getApps()</li>
</ol>
For specific information about each method, check the method documentation.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="AppRecom"><span class="type-signature"></span>new AppRecom<span class="signature">(debug)</span><span class="type-signature"></span></h4>
<div class="description">
Instantiate an AppRecom object for training and fetching recommendations.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>debug</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last">option for console log debugging</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AppRecom.js.html">AppRecom.js</a>, <a href="AppRecom.js.html#line16">line 16</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="getApps"><span class="type-signature"></span>getApps<span class="signature">(locationCategory)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Retrieves app category recommendations that best fit this location as an array.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>locationCategory</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">the category of the location (e.g. 'cafe')</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AppRecom.js.html">AppRecom.js</a>, <a href="AppRecom.js.html#line56">line 56</a>
</li></ul></dd>
</dl>
<h4 class="name" id="train"><span class="type-signature"></span>train<span class="signature">(data, min_support, min_conf, test_ratio)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Train the recommender against a data set. Entries in the data array look like:</p>
<p>
{pname: "Place Name", pcat: "Place Category", aname: "App Name", acat: "App Category"}
</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Array.<Object></span>
</td>
<td class="default">
</td>
<td class="description last">data to find association rules on.</td>
</tr>
<tr>
<td class="name"><code>min_support</code></td>
<td class="type">
<span class="param-type">Decimal</span>
</td>
<td class="default">
0.02
</td>
<td class="description last">the minimum support percentage for an itemset (0.0 - 1.0)</td>
</tr>
<tr>
<td class="name"><code>min_conf</code></td>
<td class="type">
<span class="param-type">Decimal</span>
</td>
<td class="default">
0.8
</td>
<td class="description last">the minimum confidence percentage for a rule (0.0 - 1.0)</td>
</tr>
<tr>
<td class="name"><code>test_ratio</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
0.8
</td>
<td class="description last">ratio of training data to test data (0.0 - 1.0)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="AppRecom.js.html">AppRecom.js</a>, <a href="AppRecom.js.html#line40">line 40</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
rules
</div>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AppRecom.html">AppRecom</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.1</a> on Fri Aug 25 2017 11:12:26 GMT+0900 (JST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>