From 2e2560adb1926b714546c3f9255debafb7e703e4 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Fri, 23 Aug 2013 22:42:59 +0200 Subject: [PATCH] Distributions: inline docs --- src/Numerics/Distributions/LogNormal.cs | 8 ++++++-- src/Numerics/Distributions/Normal.cs | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Numerics/Distributions/LogNormal.cs b/src/Numerics/Distributions/LogNormal.cs index 4dd69055..b7d71518 100644 --- a/src/Numerics/Distributions/LogNormal.cs +++ b/src/Numerics/Distributions/LogNormal.cs @@ -111,6 +111,7 @@ namespace MathNet.Numerics.Distributions /// The samples to estimate the distribution parameters from. /// The random number generator which is used to draw random samples. Optional, can be null. /// A log-normal distribution. + /// MATLAB: lognfit public static LogNormal Estimate(IEnumerable samples, System.Random randomSource = null) { var muSigma2 = samples.Select(s => Math.Log(s)).MeanVariance(); @@ -302,7 +303,7 @@ namespace MathNet.Numerics.Distributions /// /// Computes the inverse of the cumulative distribution function (InvCDF) for the distribution - /// at the given probability. This is also known as the 'quantile function'. + /// at the given probability. This is also known as the quantile or percent point function. /// /// The location at which to compute the inverse cumulative density. /// the inverse cumulative density at . @@ -339,6 +340,7 @@ namespace MathNet.Numerics.Distributions /// The shape (σ) of the distribution. Range: σ ≥ 0. /// the density at . /// + /// MATLAB: lognpdf public static double PDF(double mu, double sigma, double x) { if (sigma < 0.0) throw new ArgumentOutOfRangeException("sigma", Resources.InvalidDistributionParameters); @@ -381,6 +383,7 @@ namespace MathNet.Numerics.Distributions /// The shape (σ) of the distribution. Range: σ ≥ 0. /// the cumulative distribution at location . /// + /// MATLAB: logncdf public static double CDF(double mu, double sigma, double x) { if (sigma < 0.0) throw new ArgumentOutOfRangeException("sigma", Resources.InvalidDistributionParameters); @@ -391,13 +394,14 @@ namespace MathNet.Numerics.Distributions /// /// Computes the inverse of the cumulative distribution function (InvCDF) for the distribution - /// at the given probability. This is also known as the 'quantile function'. + /// at the given probability. This is also known as the quantile or percent point function. /// /// The location at which to compute the inverse cumulative density. /// The log-scale (μ) of the distribution. /// The shape (σ) of the distribution. Range: σ ≥ 0. /// the inverse cumulative density at . /// + /// MATLAB: logninv public static double InvCDF(double mu, double sigma, double p) { if (sigma < 0.0) throw new ArgumentOutOfRangeException("sigma", Resources.InvalidDistributionParameters); diff --git a/src/Numerics/Distributions/Normal.cs b/src/Numerics/Distributions/Normal.cs index f7248882..6aa13167 100644 --- a/src/Numerics/Distributions/Normal.cs +++ b/src/Numerics/Distributions/Normal.cs @@ -140,6 +140,7 @@ namespace MathNet.Numerics.Distributions /// The samples to estimate the distribution parameters from. /// The random number generator which is used to draw random samples. Optional, can be null. /// A normal distribution. + /// MATLAB: normfit public static Normal Estimate(IEnumerable samples, System.Random randomSource = null) { var meanVariance = samples.MeanVariance(); @@ -311,7 +312,7 @@ namespace MathNet.Numerics.Distributions /// /// Computes the inverse of the cumulative distribution function (InvCDF) for the distribution - /// at the given probability. This is also known as the 'quantile function'. + /// at the given probability. This is also known as the quantile or percent point function. /// /// The location at which to compute the inverse cumulative density. /// the inverse cumulative density at . @@ -373,6 +374,7 @@ namespace MathNet.Numerics.Distributions /// The location at which to compute the density. /// the density at . /// + /// MATLAB: normpdf public static double PDF(double mean, double stddev, double x) { if (stddev < 0.0) throw new ArgumentOutOfRangeException("stddev", Resources.InvalidDistributionParameters); @@ -405,6 +407,7 @@ namespace MathNet.Numerics.Distributions /// The standard deviation (σ) of the normal distribution. Range: σ ≥ 0. /// the cumulative distribution at location . /// + /// MATLAB: normcdf public static double CDF(double mean, double stddev, double x) { if (stddev < 0.0) throw new ArgumentOutOfRangeException("stddev", Resources.InvalidDistributionParameters); @@ -414,13 +417,14 @@ namespace MathNet.Numerics.Distributions /// /// Computes the inverse of the cumulative distribution function (InvCDF) for the distribution - /// at the given probability. This is also known as the 'quantile function'. + /// at the given probability. This is also known as the quantile or percent point function. /// /// The location at which to compute the inverse cumulative density. /// The mean (μ) of the normal distribution. /// The standard deviation (σ) of the normal distribution. Range: σ ≥ 0. /// the inverse cumulative density at . /// + /// MATLAB: norminv public static double InvCDF(double mean, double stddev, double p) { if (stddev < 0.0) throw new ArgumentOutOfRangeException("stddev", Resources.InvalidDistributionParameters);