Boost logo

Boost-Commit :

From: gautamcool88_at_[hidden]
Date: 2008-09-02 14:22:13


Author: s.gautam
Date: 2008-09-02 14:22:13 EDT (Tue, 02 Sep 2008)
New Revision: 48539
URL: http://svn.boost.org/trac/boost/changeset/48539

Log:
documentation of logistic distribution
Added:
   sandbox/SOC/2008/parrallel_math/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gsoc_logistic_dist.html (contents, props changed)

Added: sandbox/SOC/2008/parrallel_math/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gsoc_logistic_dist.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/parrallel_math/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gsoc_logistic_dist.html 2008-09-02 14:22:13 EDT (Tue, 02 Sep 2008)
@@ -0,0 +1,295 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Logistic Distribution</title>
+<link rel="stylesheet" href="../../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
+<link rel="start" href="../../../../index.html" title="Math Toolkit">
+<link rel="up" href="../dists.html" title="Distributions">
+
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="#"><img src="../../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="#"><img src="../../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+ Logistic
+ Distribution
+</h5></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">logistic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
+<p>
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
+ <span class="keyword">class</span> Policy <span class="special">=</span> policies::policy<> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">logistic_distribution</span><span class="special">;</span>
+
+<span class="keyword">typedef</span> <span class="identifier">logistic_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">logistic</span><span class="special">;</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> Policy<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">logistic_distribution</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>
+ <span class="comment">// Construct:
+</span> <span class="identifier">logistic_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
+ <span class="comment">// Accessors:
+</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> <span class="comment">// location.
+</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span> <span class="comment">// scale.
+</span> <span class="comment">
+<span class="special">};</span>
+
+<span class="special">}}</span> <span class="comment">// namespaces
+</span></pre>
+<p>
+ The logistic distribution is a continous probability distribution. It has two parameters - location and scale.The cumulative distribution function of the logistic distribution appears in logistic regression and feedforward neural networks. Among other applications, United State Chess Federation and FIDE use it to calculate chess ratings.
+
+
+ </p>
+
+
+<h5>
+<a name="id603350"></a>
+ Member
+ Functions
+ </h5>
+<pre class="programlisting"><span class="identifier">logistic_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
+</pre>
+<p>
+ Constructs a logistic distribution with location <span class="emphasis"><em>u</em></span>
+ and scale <span class="emphasis"><em>s</em></span>.
+ </p>
+<p>
+ Requires scale &gt; 0, otherwise domain_error
+ is called.
+ </p>
+<pre class="programlisting">
+<span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ returns the <span class="emphasis"><em>location</em></span> of this distribution.
+ </p>
+<pre class="programlisting">
+<span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ returns the <span class="emphasis"><em>scale</em></span> of this distribution.
+
+ </p>
+<h5>
+<a name="id603624"></a>
+ Non-member
+ Accessors
+ </h5>
+<p>
+ The following <a href="../nmp.html" title="Non-Member Properties">non-member
+ accessor functions</a> are supported:
+ Cumulative Distribution Function,
+ Probability Density Function,
+ Quantile,
+ mean, median,
+ mode, variance,
+ skewness,
+ kurtosis_excess,
+ range and support.
+ </p>
+<p>
+ The domain of the random variable is [-[max_value], +[min_value]]. However,
+ the pdf of +&#8734; and -&#8734; = 0 is also supported, and cdf at -&#8734; = 0, cdf at +&#8734; = 1,
+ and complement cdf -&#8734; = 1 and +&#8734; = 0, if RealType permits.
+
+</p>
+<p>
+ At p=1 and p=0, the quantile function returns the result of raise_overflow_error and raise_underflow_error
+ respectively, while the compliment quantile function returns the result of raise_underflow_error and
+ raise_overflow_error respectively.
+</p>
+
+<h5>
+<a name="id603801"></a>
+ Accuracy
+ </h5>
+<p>
+ The logistic distribution is implemented in terms of the std::exp and the log functions, so it's accuracy is related to the accurate implementations of those functions on a given platform.
+ While calculating the quantile and the inverse quantile, some non-zero u values might cause catastrophic cancellation errors. In such cases, the accuracy is reduced to ~ 100*tolerance. Refer to the test code for more details.
+ </p>
+<h5>
+<a name="id603841"></a>
+ Implementation
+ </h5>
+<p>
+ In the following table <span class="emphasis"><em>u</em></span> is the location of the distribution,
+ and <span class="emphasis"><em>s</em></span> is the scale.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Function
+ </p>
+ </th>
+<th>
+ <p>
+ Implementation Notes
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ pdf
+ </p>
+ </td>
+<td>
+ <p>
+ Using the relation: pdf = e<sup>-(x-u)/s</sup>/(s*(1+e<sup>-(x-u)/s</sup>)<sup>2</sup>)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cdf
+ </p>
+ </td>
+<td>
+ <p>
+ Using the relation: p = 1/(1+e<sup>-(x-u)/s</sup>)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ cdf complement
+ </p>
+ </td>
+<td>
+ <p>
+ Using the relation: q = 1/(1+e<sup>(x-u)/s</sup>)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ quantile
+ </p>
+ </td>
+<td>
+ <p>
+ Using the relation: x = u - s*log(1/p-1)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ quantile from the complement
+ </p>
+ </td>
+<td>
+ <p>
+ Using the relation: x = u + s*log(p/1-p)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mean
+ </p>
+ </td>
+<td>
+ <p>
+ u
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mode
+ </p>
+ </td>
+<td>
+ <p>
+ The same as the mean.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ skewness
+ </p>
+ </td>
+<td>
+ <p>
+ 0
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ kurtosis excess
+ </p>
+ </td>
+<td>
+ <p>
+ 6/5
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+variance
+ </p>
+ </td>
+<td>
+ <p>
+ <pi></pi>
+ </p>
+ </td>
+
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2008 John Maddock, Paul A. Bristow, Hubert Holin
+ Xiaogang Zhang and Gautam Sewani<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="#"><img src="../../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="#"><img src="../../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk