TimeVaryingResult

class TimeVaryingResult(*args)

Distribution factory result for non stationary likelihood estimation.

We consider a non stationary GEV model to describe the distribution of Z_t:

Z_t \sim \mbox{GEV}(\mu(t), \sigma(t), \xi(t))

We have the values of Z_t on the time stamps (t_1, \dots, t_n).

For numerical reasons, the time stamps have been normalized using the linear function:

\tau(t) = \dfrac{t-c}{d}

Each of \mu(t), \sigma(t), \xi(t) has an expression in terms of a parameter vector and time functions:

\theta(t)  = h\left(\sum_{i=1}^{d_{\theta}} \beta_i^{\theta} \varphi_i^{\theta}(\tau(t))\right)

where:

  • h: \Rset \mapsto \Rset is usually referred to as the inverse-link function. The function \theta(t) denotes either \mu(t), \sigma(t) or \xi(t),

  • each \varphi_i^{\theta} is a scalar function \Rset \mapsto \Rset,

  • each \beta_i^{j} \in \Rset.

We denote by d_{\mu}, d_{\sigma} and d_{\xi} the size of the functional basis of \mu, \sigma and \xi respectively. We denote by \vect{\beta} = (\beta_1^{\mu}, \dots, \beta_{d_{\mu}}^{\mu}, \beta_1^{\sigma}, \dots, \beta_{d_{\sigma}}^{\sigma}, \beta_1^{\xi}, \dots, \beta_{d_{\xi}}^{\xi}) the complete vector of parameters.

The estimator of vector \vect{\beta} maximizes the likelihood of the Parent distribution.

Parameters:
factoryDistributionFactory

Parent distribution factory.

data2-d sequence of float

Data.

parameterFunctionFunction

The function \vect{\theta}.

timeStamps2-d sequence of float

Values of t.

parameterDistributionDistribution

The distribution of \vect{\beta}.

normalizationFunctionLinearFunction

The normalization function t \mapsto \tau(t).

llhfloat

Maximum log-likelihood.

Methods

drawDiagnosticPlot()

Draw the 4 usual diagnostic plots.

drawParameterFunction([parameterIndex])

Draw the parameter function.

drawQuantileFunction(p)

Draw the quantile function.

getClassName()

Accessor to the object's name.

getDistribution(t)

Accessor to the Parent distribution at a given time.

getId()

Accessor to the object's id.

getLogLikelihood()

Optimal log-likelihood value accessor.

getName()

Accessor to the object's name.

getNormalizationFunction()

Normalizing function accessor.

getOptimalParameter()

Optimal parameter accessor.

getParameterDistribution()

Accessor to the distribution of \vect{\beta}.

getParameterFunction()

Parameter function accessor.

getShadowedId()

Accessor to the object's shadowed id.

getVisibility()

Accessor to the object's visibility state.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

setLogLikelihood(logLikelihood)

Optimal log-likelihood value accessor.

setName(name)

Accessor to the object's name.

setParameterDistribution(parameterDistribution)

Accessor to the distribution of of \vect{\beta}.

setShadowedId(id)

Accessor to the object's shadowed id.

setVisibility(visible)

Accessor to the object's visibility state.

getTimeGrid

__init__(*args)
drawDiagnosticPlot()

Draw the 4 usual diagnostic plots.

If Z_t is a non stationary GEV model defined as follows:

Z_t \sim \mbox{GEV}(\mu(t), \sigma(t), \xi(t))

then the standardized variables \hat{Z}_t defined by:

\hat{Z}_t = \dfrac{1}{\xi(t)} \log \left[1+ \xi(t)\left( \dfrac{Z_t-\mu(t)}{\sigma(t)} \right)\right]

have the standard Gumbel distribution which is the GEV model with (\mu, \sigma, \xi) = (0, 1, 0).

Then, the 4 diagnostic graphs are built from the transformed data compared to the Gumbel model: the probability-probability plot, the quantile-quantile plot, the return level plot, the data histogram with the Gumbel distribution.

If (\hat{z}_{(1)}, \dots, \hat{z}_{(n)}) denotes the ordered block maximum transformed data, the graphs are defined as follows.

The probability-probability plot consists of the points:

\left\{ \left( i/(n+1),\exp (-\exp (-\hat{z}_{(i)})) \right), i=1, \dots , n\right\}

The quantile-quantile plot consists of the points:

\left\{  \left(  \hat{z}_{(i)},  -\log(-\log(i/(n+1)))  \right), i=1, \dots , n\right\}

The return level plot consists of the points:

\left\{ \left( m, \hat{z}_m\right),m> 0\right\}

and the points:

\left\{ \left( m, \hat{z}_{m}^{emp}\right), m> 0\right\}

where \hat{z}_{m}^{emp} is the empirical m-block return level of the transformed data and \hat{z}_{m} the m-block return level of the Gumbel distribution.

Returns:
gridGridLayout
Returns a grid of 4 graphs:
  • the QQ-plot,

  • the PP-plot,

  • the return level graph (with confidence lines),

  • the density graph.

drawParameterFunction(parameterIndex=0)

Draw the parameter function.

Parameters:
parameterIndexint,

The index j specifying the marginal of \vect{\theta}.

Returns:
graphGraph

Graph of \theta_j(t).

drawQuantileFunction(p)

Draw the quantile function.

The quantile function is the function t \mapsto q_p(t) where q_p(t) is the quantile of order p of the Parent distribution at time t.

Parameters:
pfloat

The quantile level.

Returns:
graphGraph

Quantile function graph.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getDistribution(t)

Accessor to the Parent distribution at a given time.

Parameters:
tfloat

Time value.

Returns:
distributionDistribution

The Parent distribution at time t.

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getLogLikelihood()

Optimal log-likelihood value accessor.

Returns:
llhfloat

Maximum log-likelihood.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getNormalizationFunction()

Normalizing function accessor.

Returns:
normalizeFunctionFunction

The function t \mapsto \tau(t).

getOptimalParameter()

Optimal parameter accessor.

Returns:
optimalParameterPoint

Optimal vector of parameters \vect{\beta}.

getParameterDistribution()

Accessor to the distribution of \vect{\beta}.

Returns:
parameterDistributionDistribution

The distribution of the estimator of \vect{\beta}.

getParameterFunction()

Parameter function accessor.

Returns:
parameterFunctionFunction

The function t \mapsto \vect{\theta}(t).

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
idint

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:
hasVisibleNamebool

True if the name is not empty and not the default one.

setLogLikelihood(logLikelihood)

Optimal log-likelihood value accessor.

Parameters:
llhfloat

Maximum log-likelihood.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setParameterDistribution(parameterDistribution)

Accessor to the distribution of of \vect{\beta}.

Parameters:
parameterDistributionDistribution

The distribution of the estimator of \vect{\beta}.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:
idint

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:
visiblebool

Visibility flag.

Examples using the class

Estimate a GEV on the Port Pirie sea-levels data

Estimate a GEV on the Port Pirie sea-levels data

Estimate a GEV on the Fremantle sea-levels data

Estimate a GEV on the Fremantle sea-levels data

Estimate a GEV on race times data

Estimate a GEV on race times data