Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGR
Commits
761c2d55
Commit
761c2d55
authored
Feb 21, 2019
by
Delaigue Olivier
Browse files
v1.1.2.43 CLEAN: ErrorCrit now returns rescaled weights of composite criterion
parent
13c1b616
Changes
3
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
761c2d55
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.2.4
2
Date: 2019-02-1
9
Version: 1.1.2.4
3
Date: 2019-02-
2
1
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
person("Charles", "Perrin", role = c("aut", "ths"), comment = c(ORCID = "0000-0001-8552-1881")),
...
...
NEWS.rmd
View file @
761c2d55
...
...
@@ -13,7 +13,7 @@ output:
### 1.1.2.4
2
Release Notes (2019-02-1
9
)
### 1.1.2.4
3
Release Notes (2019-02-
2
1)
...
...
R/ErrorCrit.R
View file @
761c2d55
...
...
@@ -37,10 +37,11 @@ ErrorCrit <- function(InputsCrit, OutputsModel, FUN_CRIT, warnings = TRUE, verbo
listValCrit
<-
sapply
(
listOutputsCrit
,
function
(
x
)
x
[[
"CritValue"
]])
listNameCrit
<-
sapply
(
listOutputsCrit
,
function
(
x
)
x
[[
"CritName"
]])
listweights
<-
unlist
(
lapply
(
InputsCrit
,
function
(
x
)
x
[[
"weights"
]]))
listweights
<-
listweights
/
sum
(
listweights
)
if
(
inherits
(
InputsCrit
,
"Compo"
))
{
CritValue
<-
sum
(
listValCrit
*
(
listweights
/
sum
(
listweights
))
)
CritValue
<-
sum
(
listValCrit
*
listweights
)
OutputsCritCompo
<-
list
(
MultiCritValues
=
listValCrit
,
MultiCritNames
=
listNameCrit
,
MultiCritWeights
=
listweights
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment