Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hydroPSO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Senoner Samuel
hydroPSO
Commits
3a4ec491
Commit
3a4ec491
authored
12 years ago
by
Mauricio Zambrano-Bigiarini
Browse files
Options
Downloads
Patches
Plain Diff
'plot_NparOF.R: changed defaults for 'GoFcuts' argument
parent
2f4a634c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/plot_NparOF.R
+11
-4
11 additions, 4 deletions
R/plot_NparOF.R
man/ReadPlot_params.Rd
+2
-2
2 additions, 2 deletions
man/ReadPlot_params.Rd
with
13 additions
and
6 deletions
R/plot_NparOF.R
+
11
−
4
View file @
3a4ec491
...
...
@@ -68,7 +68,7 @@ plot_NparOF <- function(params,
# Checking 'param.names'
for
(
i
in
1
:
npar
)
{
if
(
!
(
param.names
[
i
]
%in%
colnames
(
params
))
)
stop
(
"Invalid argument: The field '"
,
param.names
[
i
],
"' does
n'
t exist in 'params'"
)
stop
(
"Invalid argument: The field '"
,
param.names
[
i
],
"' does
no
t exist in 'params'"
)
par.pos
[
i
]
<-
which
(
colnames
(
params
)
==
param.names
[
i
])
}
# FOR end
...
...
@@ -98,11 +98,18 @@ plot_NparOF <- function(params,
if
(
verbose
)
message
(
"[ Number of behavioural parameter sets: "
,
nbeh
,
" ]"
)
}
# IF end
# If the user didn't provide 'GOFcuts', the 5 quantiles are used
if
(
length
(
GOFcuts
)
==
1
){
if
(
GOFcuts
==
"auto"
)
GOFcuts
<-
unique
(
quantile
(
as.numeric
(
gofs
),
probs
=
c
(
0
,
0.25
,
0.5
,
0.75
,
0.9
,
0.95
,
1
),
na.rm
=
TRUE
)
)
if
(
GOFcuts
==
"auto"
)
{
ifelse
(
MinMax
==
"min"
,
GOFcuts
<-
unique
(
quantile
(
as.numeric
(
gofs
),
#probs=c(0, 0.25, 0.5, 0.75, 0.9, 0.95, 1), na.rm=TRUE) ),
probs
=
c
(
0
,
0.5
,
0.95
,
0.97
,
0.98
,
0.99
,
1
),
na.rm
=
TRUE
)
),
GOFcuts
<-
unique
(
quantile
(
as.numeric
(
gofs
),
probs
=
c
(
0
,
0.25
,
0.5
,
0.75
,
0.9
,
0.95
,
1
),
na.rm
=
TRUE
)
),
}
# IF end
}
# IF end
##############################################################################
...
...
This diff is collapsed.
Click to expand it.
man/ReadPlot_params.Rd
+
2
−
2
View file @
3a4ec491
...
...
@@ -242,9 +242,9 @@ setwd("~")
# Setting the seed
set.seed(100)
# Runing PSO with the 'sphere' test function, writ
t
ing the results to text files
# Runing PSO with the 'sphere' test function, writing the results to text files
hydroPSO(
fn=
"
sphere
"
, lower=rep(-100, nparam), upper=rep(100, nparam),
fn= sphere, lower=rep(-100, nparam), upper=rep(100, nparam),
control=list(npart=2*nparam, maxit=100, write2disk=TRUE, plot=TRUE)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment