STK++ 0.9.13
STK_Law_Logistic.cpp
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: stkpp::STatistiK::Law
27 * Purpose: Logistic probability distribution.
28 * Author: Serge Iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
35#ifndef IS_RTKPP_LIB
36#include "../include/STK_Law_Logistic.h"
37#endif
38
39namespace STK
40{
41namespace Law
42{
43
44#ifndef IS_RTKPP_LIB
45
46/* @brief Generate a pseudo logisticized Logistic random variate.
47 *
48 * Generate a pseudo logisticized Logistic random variate
49 * with location parameter @c mu_ and scale @c scale_.
50 * @return a pseudo logistic random variate
51 **/
53{
54 return 0;
55}
56/* @param x a real value
57 * @return the value of the logistic pdf at @c x
58 **/
59Real Logistic::pdf( Real const& x) const
60{
61 return 0;
62}
63/* @return Give the value of the log-pdf at x.
64 * @param x a real value
65 **/
66Real Logistic::lpdf( Real const& x) const
67{
68 return 0;
69}
70/* @brief Compute the cumulative distribution function at t of
71 * the standard logistic distribution.
72 *
73 * The cumulative distribution function of the logistic distribution is
74 * also a scaled version of the Hyperbolic function.
75 * \f[
76 * F(t; \mu, s) = \frac{1}{1+e^{-\frac{t-\mu}{s}}}
77 * = \frac{1}{2} + \frac{1}{2} \;\operatorname{tanh}\!\left(\frac{t-\mu}{2s}\right).
78 * \f]
79 *
80 * @param t a real value
81 * @return the cumulative distribution function value at t
82 **/
83Real Logistic::cdf( Real const& t) const
84{
85 return 0;
86}
87
88/* @brief Compute the inverse cumulative distribution function at p
89 * of the standard logistic distribution.
90 *
91 * The inverse cumulative distribution function (quantile function) of the
92 * logistic distribution is a generalization of the logit function.
93 * It is defined as follows:
94 * \f[
95 * Q(p;\mu,s) = \mu + s\,\ln\left(\frac{p}{1-p}\right).
96 * \f]
97 * @param p a probability number.
98 * @return the inverse cumulative distribution function value at p.
99 **/
100Real Logistic::icdf( Real const& p) const
101{
102 return 0;
103}
104
105/* @brief Generate a pseudo Logistic random variate.
106 *
107 * Generate a pseudo Logistic random variate with location @c mu and
108 * scale @c scale parameters.
109 * @param mu mean of the Logistic distribution
110 * @param scale scale of the Logistic distribution
111 * @return a pseudo logistic random variate, centered in @c mu and with
112 * scale @c scale
113 **/
114Real Logistic::rand( Real const& mu, Real const& scale)
115{
116 return 0;
117}
118/* @param x a real value
119 * @param mu mean of the logistic law
120 * @param scale scale of the logistic law
121 * @return the value of the logistic pdf at @c x
122 **/
123Real Logistic::pdf( Real const& x, Real const& mu, Real const& scale)
124{
125 return 0;
126}
127/* @return Give the value of the log-pdf at x.
128 * @param x a real value
129 * @param mu mean of the logistic law
130 * @param scale scale of the logistic law
131 **/
132Real Logistic::lpdf( Real const& x, Real const& mu, Real const& scale)
133{
134 return 0;
135}
136/* @brief Compute the cumulative distribution function at t of
137 * the standard logistic distribution.
138 *
139 * @param t a real value
140 * @return the cumulative distribution function value at t
141 **/
142Real Logistic::cdf( Real const& t, Real const& mu, Real const& scale)
143{
144 return 0;
145}
146
147/* @brief Compute the inverse cumulative distribution function at p
148 * of the standard logistic distribution.
149 *
150 * @param p a probability number.
151 * @return the inverse cumulative distribution function value at p.
152 **/
153Real Logistic::icdf( Real const& p, Real const& mu, Real const& scale)
154{
155 return 0;
156}
157
158#endif
159
160} // namespace Law
161
162} // namespace STK
163
virtual Real pdf(Real const &x) const
Real rand() const
Generate a pseudo Logistic random variate.
virtual Real icdf(Real const &p) const
Compute the inverse cumulative distribution function at p of the standard logistic distribution.
virtual Real cdf(Real const &t) const
Compute the cumulative distribution function at t of the standard logistic distribution.
virtual Real lpdf(Real const &x) const
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.