File: logistic.rb

package info (click to toggle)
ruby-distribution 0.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 624 kB
  • ctags: 379
  • sloc: ruby: 4,283; makefile: 7
file content (40 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require 'distribution/logistic/ruby'
#require 'distribution/logistic/gsl'
#require 'distribution/logistic/java'


module Distribution
  # From Wikipedia:
  # In probability theory and statistics, the logistic distribution is a continuous probability distribution. Its cumulative distribution function is the logistic function, which appears in logistic regression and feedforward neural networks. It resembles the normal distribution in shape but has heavier tails (higher kurtosis).
  module Logistic
    SHORTHAND='logis'
    extend Distributable
    create_distribution_methods
    ##
    # :singleton-method: rng(u,s)
    # Returns a proc, which returns a different logistic
    # variate each time is called
    # * u: mean
    # * s: variance related parameter
    ##
    # :singleton-method: pdf(x , u,s)
    # Returns the pdf for logistic distribution (f(x,u,s))
    # * u: mean
    # * s: variance related parameter
    
    ##
    # :singleton-method: cdf(x,u,s)
    # Returns the cdf for logistic distribution (F(x,u,s))
    # * u: mean
    # * s: variance related parameter

    ##
    # :singleton-method: p_value(pr , u,s)
    # Returns the inverse cdf for logistic distribution 
    # (F^-1(pr,u,s))
    # * u: mean
    # * s: variance related parameter
    

  end
end