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 Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.13.11 Version: 1.2.13.12
Date: 2019-04-03 Date: 2019-04-03
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -13,7 +13,7 @@ output: ...@@ -13,7 +13,7 @@ output:
### 1.2.13.11 Release Notes (2019-04-03) ### 1.2.13.12 Release Notes (2019-04-03)
......
...@@ -83,7 +83,8 @@ upperGR4J <- rep(+9.99, times = 4) ...@@ -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: 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} ```{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, objective = OptimGR4J,
lower = lowerGR4J, upper = upperGR4J, lower = lowerGR4J, upper = upperGR4J,
control = list(trace = 1)) control = list(trace = 1))
...@@ -108,12 +109,12 @@ We can then extract the best parameter sets and the value of the performance cri ...@@ -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} ```{r, warning=FALSE, results='hide', eval=FALSE}
parPORT <- t(sapply(listOptPORT, function(x) x$par)) parPORT <- t(sapply(listOptPORT, function(x) x$par))
objPORT <- sapply(listOptPORT, function(x) x$objective) 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. 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} ```{r, warning=FALSE}
summary(parPORT) summary(resPORT)
``` ```
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. 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, ...@@ -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. 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} ```{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"),
round(rbind( round(rbind(
OutputsCalib$ParamFinalR , OutputsCalib$ParamFinalR ,
airGR::TransfoParam_GR4J(ParamIn = optPORT$par , Direction = "TR"), airGR::TransfoParam_GR4J(ParamIn = optPORT$par , Direction = "TR"),
...@@ -165,7 +166,7 @@ parGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"), ...@@ -165,7 +166,7 @@ parGLOB <- data.frame(Algo = c("airGR", "PORT", "DE", "PSO", "MA-LS"),
digits = 3)) digits = 3))
``` ```
```{r, warning=FALSE, echo=FALSE} ```{r, warning=FALSE, echo=FALSE}
parGLOB resGLOB
``` ```
<!-- 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. --> <!-- 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