mle_parameters {NORMA}R Documentation

MLE Parameters

Description

mle_parameters computes the optimal parameters via MLE of a given distribution.

zero_laplace_mle computes the optimal parameters via MLE assuming a zero-mean Laplace as noise distribution.

general_laplace_mle computes the optimal parameters via MLE assuming a general Laplace as noise distribution.

zero_gaussian_mle computes the optimal parameters via MLE assuming a zero-mean Gaussian as noise distribution.

general_gaussian_mle computes the optimal parameters via MLE assuming a general Gaussian as noise distribution.

beta_mle computes the optimal parameters via MLE assuming a Beta as noise distribution.

weibull_mle computes the optimal parameters via MLE assuming a Weibull as noise distribution.

moge_mle computes the optimal parameters via MLE assuming a MOGE as noise distribution.

Usage

mle_parameters(phi, dist = "nm", ...)

zero_laplace_mle(phi)

general_laplace_mle(phi)

zero_gaussian_mle(phi)

general_gaussian_mle(phi)

beta_mle(phi, m1 = mean(phi, na.rm = T), m2 = mean(phi^2, na.rm = T),
  alpha_0 = (m1 * (m1 - m2))/(m2 - m1^2), beta_0 = (alpha_0 * (1 - m1)/m1))

weibull_mle(phi, k_0 = 1)

moge_mle(phi, lambda_0 = 1, alpha_0 = 1, theta_0 = 1)

Arguments

phi

a vector with residual values used to estimate the parameters.

dist

assumed distribution for the noise in the data. Possible values to take:

  • l: Zero-mean Laplace distribution.

  • lm: General Laplace distribution.

  • n: Zero-mean Gaussian distribution.

  • nm: General Gaussian distribution.

  • b: Beta distribution.

  • w: Weibull distribution.

  • moge: MOGE distribution.

...

additional arguments to be passed to the low level functions (see below).

m1

first moment of the residuals. Used to compute alpha_0.

m2

second moment of the residuals. Used to compute beta_0.

alpha_0

initial value for Newton-Raphson method for the parameter \alpha.

beta_0

initial value for Newton-Raphson method for the parameter \beta.

k_0

initial value for Newton-Raphson method for the parameter \kappa.

lambda_0

initial value for Newton-Raphson method for the parameter \lambda.

theta_0

initial value for Newton-Raphson method for the parameter \theta.

See also 'Details' and multiroot.

Details

For the zero-\mu Laplace distribution the optimal MLE parameters are

\sigma=mean(|\phi_i|)

, where {\phi_i} are the residuals passed as argument.

For the general Laplace distribution the optimal MLE parameters are

\mu=median(\phi_i)

\sigma=mean(|\phi_i - \mu|)

, where {\phi_i} are the residuals passed as argument.

For the zero-\mu Gaussian distribution the optimal MLE parameters are

\sigma^2=mean(\phi_i^2)

, where {\phi_i} are the residuals passed as argument.

For the general Gaussian distribution the optimal MLE parameters are

\mu=mean(\phi_i)

\sigma^2=mean((\phi_i-\mu)^2)

, where {\phi_i} are the residuals passed as argument.

For the Beta distribution values of parameters \alpha and \beta are estimated using Newton-Raphson method.

For the Weibull distribution value of parameter \kappa is estimated using Newton-Raphson method and then estimated value of \lambda is computed using the following closed form that depends on \kappa:

\lambda=mean(\phi_i^kappa)^(1/\kappa)

For the MOGE distribution values of parameters \lambda, \alpha and \theta are estimated using Newton-Raphson method.

See also 'References'.

Value

mle_parameters returns a list with the estimated parameters. Depending on the distribution these parameters will be one or more of the following ones:

sigma

scale parameter of the Laplace distribution.

mu

location or mean parameter of the Laplace or Gaussian distribution, respectively.

sigma_cuad

variance parameter of the Gaussian distribution.

alpha

shape1 parameter of the Beta distribution or second parameter of the MOGE distribution.

beta

shape2 parameter of the Beta distribution.

k

shape parameter of the Weibull distribution.

lambda

lambda scale parameter of the Weibull distribution or first parameter of the MOGE distribution.

theta

third parameter of the MOGE distribution.

Author(s)

Jesus Prada, jesus.prada@estudiante.uam.es

References

Link to the scientific paper

Prada, Jesus, and Jose Ramon Dorronsoro. "SVRs and Uncertainty Estimates in Wind Energy Prediction." Advances in Computational Intelligence. Springer International Publishing, 2015. 564-577,

with theoretical background for this package is provided below.

http://link.springer.com/chapter/10.1007/978-3-319-19222-2_47

Examples

# Estimate optimal parameters using default distribution ("nm").
mle_parameters(rnorm(100))

# Estimate optimal parameters using "lm" distribution.
mle_parameters(rnorm(100),dist="lm")

# Equivalent to mle_parameters(rnorm(100),dist="l")
zero_laplace_mle(rnorm(100))

# Equivalent to mle_parameters(rnorm(100),dist="lm")
general_laplace_mle(rnorm(100))

# Equivalent to mle_parameters(rnorm(100),dist="n")
zero_gaussian_mle(rnorm(100))

# Equivalent to mle_parameters(rnorm(100),dist="nm")
general_gaussian_mle(rnorm(100))

# Equivalent to mle_parameters(rnorm(100),dist="b")
beta_mle(rnorm(100))

# Equivalent to mle_parameters(rnorm(100),dist="w")
weibull_mle(rnorm(100))

# Equivalent to mle_parameters(rnorm(100),dist="moge")
moge_mle(rnorm(100))

[Package NORMA version 0.1 Index]