[SOLVED] problème ajustement du variogramme

Here you can report the problems encountered when using a function relative to the variography:
- experimental variography (vario.calc, vario.grid, vmap.calc, ...)
- model fitting (model.auto)

[SOLVED] problème ajustement du variogramme

Postby Maxime Beauchamp » Fri Jun 07, 2013 1:01 pm

Bonjour,

Après vous avoir contacté par mail, je fais part de mon problème d'ajustement par mail afin que cette question soit accessible à toute la communauté RGeoS.

Je résume le problème : je lance de nombreux ajustement de variogrammes afin de kriger des données de pollution atmosphérique. Une carte est ainsi produite chaque jour. Les structures variographiques utilisées sont les suivantes (j'ai corrigé l'ordre sur vos conseils) :
1) Nugget Effect
2) Exponential
3) Spherical
4) Linear

Il arrive que la procédure d'ajustement plante et me renvoie le type de message suivant :

Code: Select all
Error in parameter 2: lower bound (0.000009) > default value (0.000009)
Error in model.auto(data.vario, struct = struct_) :
Error in R_model_auto_f


Le message d'erreur fait apparaître un pb avec le paramètre 2 mais le même message apparaît parfois avec le paramètre 4.

Suite à vos conseils pour obtenir plus d'informations permettant de démarrer un debug a distance, j'ai placé l'ordre suivant avant le lancement:
debug.define("converge",1).

Je fournis la sortie obtenue avec cette commande sur l'un des variogrammes qui pose problème :

Je précise que je travaille sous une architecture SUSE Linux.
Code: Select all
Optimization Conditions
=======================
- Number of variables   = 1
- Space dimension       = 2
- Number of experiments = 20
- Number of parameters  = 6
- Constrained Minimization (OFF)
- Anisotropy               (OFF)
- Anisotropy Rotation      (OFF)
- Global Rotation          (OFF)
- Rotation around Z only   (OFF)
- Lock third dimension     (OFF)
- Consider Isotropic 2-D   (OFF)
- Use the Goulard option   (OFF)

Model
-----
Structure : Nugget Effect
 1 - Sill : 17.431838 [0.000000,NA[
Structure : Exponential
 2 - Sill : 17.431838 [0.000000,NA[
 3 - Range U : 2.371696 [0.000009,NA[
Structure : Spherical
 4 - Sill : 17.431838 [0.000000,NA[
 5 - Range U : 3.557544 [0.000009,NA[
Structure : Linear
 6 - Sill : 17.431838 [0.000000,NA[

Trajectory of parameters in Foxleg Algorithm
--------------------------------------------
 Iteration     Score     Delta     Par-1     Par-2     Par-3     Par-4     Par-5     Par-6
         1   0.00897         1    17.432    17.432     2.372    17.432     3.558    17.432
         2   0.00236         3    34.864    26.534     3.558     0.000     2.372    34.864
         3   0.00116         3    57.408     0.000     7.115     7.427     0.000    21.163
         4  0.000236         3    54.407     0.000     7.240     0.000     0.000    34.943
         5  0.000236       1.5     2.111     0.000    10.798    52.296     0.000    34.943
Convergence has not been reached

Statistics for the Minimization procedure
-----------------------------------------
Number of experimental values = 20
Number of parameters          = 6
Number of iterations          = 5/1000
Value of minimized function   = 0.000236251
Initial increment value       = 1
Current increment value       = 0.75
Increment Stopping Criterion  = 1e-05
Stopping Value                = 1.72881e-08
Stopping Criterion            = 1e-05

Model
-----
Structure : Nugget Effect
 1 - Sill : 2.111069 [0.000000,NA[
Structure : Exponential
 2 - Sill : 0.000000 [0.000000,NA[
 3 - Range U : 10.797805 [0.000009,NA[
Structure : Spherical
 4 - Sill : 52.295515 [0.000000,NA[
 5 - Range U : 0.000009 [0.000009,NA[
Structure : Linear
 6 - Sill : 34.943023 [0.000000,NA[

Suppressing the unnecessary basic structures
============================================
Structure 'Nugget Effect' in model #1 is suppressed
Structure 'Exponential' in model #1 is suppressed

Optimization Conditions
=======================
- Number of variables   = 1
- Space dimension       = 2
- Number of experiments = 20
- Number of parameters  = 3
- Constrained Minimization (OFF)
- Anisotropy               (OFF)
- Anisotropy Rotation      (OFF)
- Global Rotation          (OFF)
- Rotation around Z only   (OFF)
- Lock third dimension     (OFF)
- Consider Isotropic 2-D   (OFF)
- Use the Goulard option   (OFF)

Model
-----
Structure : Spherical
 1 - Sill : 52.295515 [0.000000,NA[
 2 - Range U : 0.000009 [0.000009,NA[
Structure : Linear
 3 - Sill : 34.943023 [0.000000,NA[
Error in parameter 2: lower bound (0.000009) > default value (0.000009)
Error in model.auto(data.vario, struct = struct_) :
  Error in R_model_auto_fit

En espérant faire avance le pb,

Maxime
Maxime Beauchamp
 
Posts: 29
Joined: Thu Jan 17, 2013 2:48 pm

Re: problème ajustement du variogramme

Postby Didier Renard » Sun Jun 09, 2013 7:51 pm

Hello Maxime

I finally understood the origin of the bug that you already mentionned several months agao ... and that I could not figure out.
In fact, the bug happens in the very particular case which I try to describe in the following lines.


We start the automatic fitting with a certain set of basic structures. The iterative procedure modifies the parameters (sill, ranges, anisotropy coefficients, ...) until convergence is reached or the number of iterations is reached.
When this happens, a cleaning procedure is launched which tries to eliminate the useless structures (a structure is considered as useless if it represents a small enough part of the total variance. This percentage is an input parameter of the automatic fitting function). Then the automatic fitting iterative procedure is launched again with the remaining active structures.
If the final solution (before the cleaning procedure) was correct enough, the values of the parameter are kept for the new iterative procedure; otherwise some new default values are assigned.
In your case, the previous values are kept. One parameter was set to its lowest possible value (the lower bound for a range). Then when entering in the iterative procedure, the first action consists in calculating the sensitivity of the minimization cost function against each parameter. This is performed by checking the gradient of the cost function for each parameter. We calculate these gradients numerically by evaluating the cost function for p - eps and p + eps (where "p" designate the starting value of the parameter and "eps" represents a small value).
This is precisly where the problem happens: i.e. when trying to evaluate the value of the cost function for p-eps, knowing that "p" was already set to the lower bound.
This bug will be fixed in version 9.1.6
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm


Return to Variography

Who is online

Users browsing this forum: No registered users and 2 guests

cron