Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco De Lucia
RedModRphree
Commits
2b10588a
Commit
2b10588a
authored
May 16, 2018
by
Marco De Lucia
Browse files
fixing stuff, creating multiplatform branch
parent
681fd6e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
R/Surr_Prepare.R
View file @
2b10588a
## Time-stamp: "Last modified 2018-05-
0
6 1
8:55:5
7 delucia"
## Time-stamp: "Last modified 2018-05-
1
6 1
4:37:4
7 delucia"
##' @title Extracts input/output tables from a list of Reactive
##' Transport Simulations
##' @param simlist a list containing the simulations
...
...
R/Surr_Train.R
View file @
2b10588a
...
...
@@ -2,7 +2,7 @@
### Marco De Lucia, delucia@gfz-potsdam.de, 2009-2018
### Janis Jatnieks, janisj@gfz-potsdam.de, jatnieks@janis.es
### Time-stamp: "Last modified 2018-05-
09 01:07:22
delucia"
### Time-stamp: "Last modified 2018-05-
11 19:30:00
delucia"
### Licence: LGPL version 2.1
## resolve dependencies automatically
...
...
@@ -25,7 +25,7 @@ start_up <- function(session_path=FALSE, ## to disable set to a non-string
"cluster"
,
"stringr"
,
"gtools"
,
#"ftsa",
"amap"
),
install
=
TRUE
,
use_cores
=
4
)
use_cores
=
1
)
{
gc
()
...
...
@@ -1978,6 +1978,7 @@ Train <- function(surrogate_types = c(),
train_para
=
TRUE
,
run_para
=
FALSE
,
preproc_para
=
TRUE
,
use_cores
=
0
,
tuner
=
FALSE
,
## you can apply a rounding specification, but it usually does more harm than good
r_digits
=
Inf
,
write_model_data
=
TRUE
,
session_path
=
FALSE
,
write_full_residuals
=
FALSE
,
write_filepath_prefix
=
"models/"
)
...
...
@@ -1985,7 +1986,7 @@ Train <- function(surrogate_types = c(),
## run only the preprocessing methods that have not been blacklisted
preprocessing_ind
<-
setdiff
(
preprocessing_ind
,
preprocessing_blacklist
)
start_up
(
session_path
=
s
aved_simulat
ion_
d
at
a
,
use_cores
=
use_cores
)
## load libraries etc
start_up
(
session_path
=
s
ess
ion_
p
at
h
,
use_cores
=
use_cores
)
## load libraries etc
## if ( use_cores>0 ) {
## if ( getDoParRegistered() ) {
...
...
demo/demo-eq-TrainMultiple.R
View file @
2b10588a
...
...
@@ -10,7 +10,7 @@ path_dumps <- "TrainedModels/"
if
(
!
dir.exists
(
path_dumps
))
dir.create
(
path_dumps
,
showWarnings
=
FALSE
)
Train
(
c
(
"
PolyMARS"
,
"glmStepAIC
"
,
"MARS"
),
Train
(
c
(
"
parRF"
,
"leaps
"
,
"MARS"
),
preprocessing_ind
=
c
(
17
),
input_data
=
des
,
output_data
=
res
,
...
...
@@ -20,10 +20,11 @@ Train(c("PolyMARS", "glmStepAIC", "MARS"),
allow_neg_cols
=
"pe"
,
preproc_para
=
FALSE
,
selection_criteria
=
"MAD"
,
write_full_residuals
=
FALS
E
,
write_full_residuals
=
TRU
E
,
tuner
=
FALSE
,
use_cores
=
8
,
training_samples
=
0.95
,
session_path
=
FALSE
,
write_filepath_prefix
=
path_dumps
)
...
...
Write
Preview
Supports
Markdown
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