Trains an IBHM model using training data with input variables x and a single output variable y.
Usage
TrainIBHM(x, y, config = ConfigureIBHM())
Arguments
x
Training data input variables. Should be convertible to a matrix with each row corresponding to a single data point.
y
Training data output variable. Should be convertible to a matrix with a single column and the number of rows equal to the number of rows of x.
config
A configuration object created using ConfigureIBHM. Contains settings such as the stop criterion, optimization method parameters etc.
Value
The created model which is an object of class "IBHM".
References
Zawistowski, P. and Arabas, J.: "Benchmarking IBHM method using NN3 competition dataset." In Proc. 6th int. conf. on Hybrid artificial intelligent systems - Vol. 1, HAIS'11, pp 263–270, 2011. Springer-Verlag.
See Also
ConfigureIBHM,summary.IBHM,predict.IBHM
Examples
# Training data
x <- seq(-3,3,length.out=400)
y <- tanh(x)
# A held out validation set for the stop criterion
x.val <- runif(50,min=-6,max=6)
y.val <- tanh(x.val)
# Training the model using the validation set to prevent overfitting
m <- TrainIBHM(x,y,
ConfigureIBHM(stop.criterion = ValidationSC(x.val, y.val))
)
summary(m)
plot(y.val,predict(m,x.val),asp=1)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(IBHM)
Loading required package: compiler
Loading required package: DEoptim
DEoptim package
Differential Evolution algorithm in R
Authors: D. Ardia, K. Mullen, B. Peterson and J. Ulrich
Loading required package: cmaes
Loading required package: Rcpp
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/IBHM/TrainIBHM.Rd_%03d_medium.png", width=480, height=480)
> ### Name: TrainIBHM
> ### Title: TrainIBHM
> ### Aliases: TrainIBHM
> ### Keywords: ~models ~regression ~nonlinear
>
> ### ** Examples
>
> # Training data
> x <- seq(-3,3,length.out=400)
> y <- tanh(x)
>
> # A held out validation set for the stop criterion
> x.val <- runif(50,min=-6,max=6)
> y.val <- tanh(x.val)
>
>
> # Training the model using the validation set to prevent overfitting
> m <- TrainIBHM(x,y,
+ ConfigureIBHM(stop.criterion = ValidationSC(x.val, y.val))
+ )
Note: no visible binding for global variable '.refClassDef'
Note: no visible binding for global variable '.refClassDef'
Note: no visible binding for global variable '.pointer'
Note: no visible binding for global variable '.pointer'
Note: no visible binding for global variable '.pointer'
>
> summary(m)
Model equation: 1.00e+00 -2.00e+00 logsig ( 2.73e+00 * dot.pr (x,[ 9.48e-01 7.32e-01 ]) + -2.59e+00 )
Model size: 1
Train set dim: 1 Train set size: 400
MSE: 3.754636e-14 Std. dev:
RMSE: 1.937688e-07
Pearson correlation coefficient: 1
> plot(y.val,predict(m,x.val),asp=1)
>
>
>
>
>
> dev.off()
null device
1
>
Note: no visible binding for global variable '.pointer'