Commit 52a2ab60 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.13.12 DOC: minor revision of the param optim vignette

parent fe25bd78
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Date: 2019-04-03
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......@@ -13,7 +13,7 @@ output:
### Release Notes (2019-04-03)
### Release Notes (2019-04-03)
......@@ -83,7 +83,8 @@ upperGR4J <- rep(+9.99, times = 4)
We start with a local optimization strategy by using the PORT routines (using the `nlminb()` of the `stats` package) and by setting a starting point in the transformed parameter space:
```{r, warning=FALSE, results='hide', eval=FALSE}
optPORT <- stats::nlminb(start = c(4.1, 3.9, -0.9, -8.7),
startGR4J <- c(4.1, 3.9, -0.9, -8.7)
optPORT <- stats::nlminb(start = startGR4J,
objective = OptimGR4J,
lower = lowerGR4J, upper = upperGR4J,
control = list(trace = 1))
......@@ -108,12 +109,12 @@ We can then extract the best parameter sets and the value of the performance cri
```{r, warning=FALSE, results='hide', eval=FALSE}
parPORT <- t(sapply(listOptPORT, function(x) x$par))
objPORT <- sapply(listOptPORT, function(x) x$objective)
parPORT <- data.frame(parPORT, RMSE = objPORT)
resPORT <- data.frame(parPORT, RMSE = objPORT)
As can be seen below, the optimum performance criterion values (column *objective*) can differ from the global optimum value in many cases, resulting in various parameter sets.
```{r, warning=FALSE}
The existence of several local minima illustrates the importance of defining an appropriate starting point or of using a multi-start strategy or a global optimization strategy.
......@@ -155,7 +156,7 @@ optMALS <- Rmalschains::malschains(fn = OptimGR4J,
As it can be seen in the table below, the four additional optimization strategies tested lead to very close optima.
```{r, warning=FALSE, echo=FALSE, eval=FALSE}
parGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"),
resGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"),
OutputsCalib$ParamFinalR ,
airGR::TransfoParam_GR4J(ParamIn = optPORT$par , Direction = "TR"),
......@@ -165,7 +166,7 @@ parGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"),
digits = 3))
```{r, warning=FALSE, echo=FALSE}
<!-- This is an expected result because the response surface for quadratic performance criteria of the **GR4J** model is generally sufficiently well defined in the transformed parameter space to allow using a local optimization strategy instead of a more time consuming global optimization strategy. -->
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment