Description Usage Arguments Details Value Author(s) References Examples
svres
is a hybrid algorithm which combines support vector regression and evolutionary strategy (uncorrelated mutation with p step sizes) to build predictive models.
1 |
X.train |
Data matrix (numeric) containing the input values (predictors) used to train the model. |
Y.train |
Response vector (numeric) used to train the model. |
X.test |
Data matrix (numeric) containing the input values (predictors) used to test the model. |
PercentValid |
Percentage of the data reserved for validation. Default is |
Generations |
Number of generations considered to train the model. Default is |
InitialGamma |
Initial gamma hyperparameter. Default is |
ErrorFunc |
Error function to be minimized. The default is the function |
Step |
Option whether to use the stepwise regression to prescreening the input variables. Default is |
StepBoruta |
Option whether to use the Boruta selection to prescreening the input variables. Default is |
SplitRandom |
Option whether to split the train set randomly. Default is |
Trace |
If |
dTrace |
Frequency which the information is pritend during the running of |
earlyStop |
Stopping criterium for the evolutionary algorithm using the number of consecutive generations without improvements. Default is |
kfold |
if a integer value k>1 is specified, a k-fold cross validation on the training data is performed. |
To achieve better results, the use of a pre-processing technique (e.g. standardization of variables) is important.
If there are multiple minima, try different values of InitialGamma
.
error.svm |
|
forecast |
A vector of predicted values generated by the best trained model. |
svmf |
An object of class "svm" containing the fitted model. |
ffTrain |
Error value of the training based on |
ffValid |
Error value of the validation based on |
stepvars |
Variables selected by the prescreening methods when they are used. |
Aranildo R. Lima and Alex J. Cannon
Aranildo R. Lima, Alex J. Cannon, William W. Hsieh, Nonlinear regression in environmental sciences by support vector machines combined with evolutionary strategy, Computers & Geosciences, Volume 50, January 2013, Pages 136-144, ISSN 0098-3004, http://www.sciencedirect.com/science/article/pii/S0098300412002269
Cherkassky, V. and Ma, Y., 2004. Practical selection of SVM parameters and noise estimation for SVM regression. Neural Netw. 17, 113-126.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## necessary libraries
library(qualV)
library(e1071)
library(FNN)
## generating sets
x1 <- rnorm(1000)
x2 <- x1^2
y <- x1+x2
x.fit <- cbind(x1,x2)[1:700,]
x.test <- cbind(x1,x2)[701:1000,]
y.fit <- y[1:700]
y.test <- y[701:1000]
## running SVR-ES
resul <- svres(x.fit, y.fit, x.test)
## points are the target and lines are the forecasting
plot(y.test[1:100])
lines(resul$forecast[1:100])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.