Skip to content

[HELP] Computation of Q2 and cR #20

@antoinecollet5

Description

@antoinecollet5

@jonghyunharrylee

I am working on a deep refactoring of the code that I am hosting here for now: https://github.com/antoinecollet5/pyrtid/blob/master/pyrtid/inverse/solvers/pcga/pcga.py
I will push the code when it is ready and entirely tested.

I have a general question regarding the computation of Q2 and cR for model validation.

I guess the main reference is Kitanidis PK. Introduction to Geostatistics: Applications in Hydrogeology. Cambridge University Press; 1997.

If I understand correctly, Q2 is given by (6.67):

$$ Q_2 = \dfrac{1}{n-p} \sum^{n}_{k=p+1} \dfrac{\delta_k^2}{\sigma_k^{2}} $$

And we target $Q_2 = 1$

Whereas cR which we seek as small as possible is given by 4.30:

$$ cR = Q_2 \exp \left( \dfrac{1}{n-p} \sum^{n}_{k=p+1} \ln\left(\sigma_k^{2}\right) \right) $$

Question 1:

In the code, $Q_2$ is defined as

Q2_all[:, i : i + 1] = np.dot(b[:n].T, xi) / (n - p)

which I understand as

$$ Q_2 = \dfrac{1}{n-p}\left(\mathbf{y} - h(\mathbf{\overline{s}}) + \mathbf{H}\overline{\mathbf{s}}\right)^{\mathrm{T}} \overline{\boldsymbol{\xi}} $$

Where is this expression coming from ? Do you have any reference explaining the derivation ?

Question 2, how is cR derived ? Or more specifically $\sigma^{2}$ ? In the code, tt is only implemented if $\mathbf{R}$ is a single element and I am not sure how to define the variance of residuals in the context.

Thank you in advance for your reply.

Best

Antoine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions