UNPKG

qminer

Version:

A C++ based data analytics platform for processing large-scale real-time streams containing structured and unstructured data

322 lines (318 loc) 12.6 kB
<!doctype html> <html> <head> <meta name="generator" content="JSDoc 3"> <meta charset="utf-8"> <title>Class: ThresholdModel</title> <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css"> <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css"> <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css"> <link href="css/baseline.css" rel="stylesheet"> </head> <body onload="prettyPrint()"> <nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar"> <div id="jsdoc-navbar-container"> <div id="jsdoc-navbar-content"> <a href="index.html" class="jsdoc-navbar-package-name">QMiner JavaScript API v9.4.0</a> </div> </div> </nav> <div id="jsdoc-body-container"> <div id="jsdoc-content"> <div id="jsdoc-content-container"> <div id="jsdoc-main" role="main"> <header class="page-header"> <div class="symbol-detail-labels"><span class="label label-kind">class</span>&nbsp;<span class="label label-static">static</span></div> <h1><small><a href="module-analytics.html">analytics</a>.<wbr></small><span class="symbol-name">ThresholdModel</span></h1> <p class="source-link">Source: <a href="analyticsdoc.js.html#source-line-3269">analyticsdoc.<wbr>js:3269</a></p> <div class="symbol-classdesc"> <p>The Threshold model. Uses the methods from the module:analytics.metrics.</p> </div> <dl class="dl-compact"> </dl> </header> <section id="summary"> <div class="summary-callout"> <h2 class="summary-callout-heading">Methods</h2> <div class="summary-content"> <div class="summary-column"> <dl class="dl-summary-callout"> <dt><a href="module-analytics.ThresholdModel.html#decisionFunction">decisionFunction(x)</a></dt> <dd> </dd> </dl> </div> <div class="summary-column"> <dl class="dl-summary-callout"> <dt><a href="module-analytics.ThresholdModel.html#fit">fit(X, y)</a></dt> <dd> </dd> </dl> </div> <div class="summary-column"> <dl class="dl-summary-callout"> <dt><a href="module-analytics.ThresholdModel.html#predict">predict(x)</a></dt> <dd> </dd> </dl> </div> </div> </div> </section> <section> <h2 id="ThresholdModel">new&nbsp;<span class="symbol-name">ThresholdModel</span><span class="signature"><span class="signature-params">([arg])</span></span></h2> <p>Threshold Model</p> <section> <h3> Example </h3> <div> <pre class="prettyprint"><code>// TODO</code></pre> </div> </section> <section> <h3>Parameters</h3> <table class="jsdoc-details-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Optional</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <p>arg</p> </td> <td> <p>Object</p> </td> <td> <p>Yes</p> </td> <td> <p>The constructor parameters.</p> <p>Values in <code>arg</code> have the following properties:</p> <table class="jsdoc-details-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Optional</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <p>target</p> </td> <td> <p>string</p> </td> <td> <p>Yes</p> </td> <td> <p>Target type. Possible options are <code>&quot;recall&quot;</code> and <code>&quot;precision&quot;</code>.</p> </td> </tr> <tr> <td> <p>level</p> </td> <td> <p>TODO</p> </td> <td> <p>Yes</p> </td> <td> <p>TODO</p> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </section> <dl class="dl-compact"> </dl> </section> <section> <h2>Methods</h2> <section> <h3 id="decisionFunction"><span class="symbol-name">decisionFunction</span><span class="signature"><span class="signature-params">(x)</span>&nbsp;&rarr; <span class="signature-returns"> (number or <a href="module-la.Vector.html">module:la.Vector</a>)</span></span></h3> <p>Apply all models to the given vector and returns the distance to the class boundary.</p> <section> <h4> Example </h4> <div> <pre class="prettyprint"><code>// TODO</code></pre> </div> </section> <section> <h4>Parameter</h4> <table class="jsdoc-details-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Optional</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <p>x</p> </td> <td> <p>(number or <a href="module-la.Vector.html">module:la.Vector</a>)</p> </td> <td> <p>&nbsp;</p> </td> <td> <p>The prediction score for each class.</p> </td> </tr> </tbody> </table> </section> <dl class="dl-compact"> <dt>Returns</dt> <dd> <p><code>(number or <a href="module-la.Vector.html">module:la.Vector</a>)</code>B <br>1. value of the translated prediction based on the threshold, if <code>x</code> is <code>number</code>, <br>2. <a href="module-la.Vector.html">module:la.Vector</a> of translated prediction based on the threshold, if <code>x</code> is <a href="module-la.Vector.html">module:la.Vector</a>. </p> </dd> </dl> <h3 id="fit"><span class="symbol-name">fit</span><span class="signature"><span class="signature-params">(X, y)</span></span></h3> <p>Fits the model.</p> <section> <h4> Example </h4> <div> <pre class="prettyprint"><code>// TODO</code></pre> </div> </section> <section> <h4>Parameters</h4> <table class="jsdoc-details-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Optional</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <p>X</p> </td> <td> <p><a href="module-la.Vector.html">module:la.Vector</a></p> </td> <td> <p>&nbsp;</p> </td> <td> <p>Prediction for each instance (output of descisionFunction).</p> </td> </tr> <tr> <td> <p>y</p> </td> <td> <p>number</p> </td> <td> <p>&nbsp;</p> </td> <td> <p>The target labels (1 or -1).</p> </td> </tr> </tbody> </table> </section> <dl class="dl-compact"> </dl> <h3 id="predict"><span class="symbol-name">predict</span><span class="signature"><span class="signature-params">(x)</span>&nbsp;&rarr; <span class="signature-returns"> (number or <a href="module-la.Vector.html">module:la.Vector</a>)</span></span></h3> <p>Returns the most likely category.</p> <section> <h4> Example </h4> <div> <pre class="prettyprint"><code>// TODO</code></pre> </div> </section> <section> <h4>Parameter</h4> <table class="jsdoc-details-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Optional</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <p>x</p> </td> <td> <p>(number or <a href="module-la.Vector.html">module:la.Vector</a>)</p> </td> <td> <p>&nbsp;</p> </td> <td> <p>The prediction score for each class.</p> </td> </tr> </tbody> </table> </section> <dl class="dl-compact"> <dt>Returns</dt> <dd> <p><code>(number or <a href="module-la.Vector.html">module:la.Vector</a>)</code>B <br>1. value of the positive label IDs, if <code>x</code> is <code>number</code>, <br>2. <a href="module-la.Vector.html">module:la.Vector</a> of the positive label IDs, if <code>x</code> is <a href="module-la.Vector.html">module:la.Vector</a>. </p> </dd> </dl> </section> </section> </div> </div> <nav id="jsdoc-toc-nav" role="navigation"></nav> </div> </div> <footer id="jsdoc-footer" class="jsdoc-footer"> <div id="jsdoc-footer-container"> <p> </p> </div> </footer> <script src="scripts/jquery.min.js"></script> <script src="scripts/tree.jquery.js"></script> <script src="scripts/prettify.js"></script> <script src="scripts/jsdoc-toc.js"></script> <script src="scripts/linenumber.js"></script> <script src="scripts/scrollanchor.js"></script> </body> </html>