Simple Linear Regression (SLR) is a statistical method that examines the linear relationship between two continuous variables, X and Y. X is regarded as the independent variable while Y is regarded as the dependent variable. SLR discovers the best fitting line using Ordinary Least Squares (OLS) criterion. OLS criterion minimizes the sum of squared prediction error.
setwd("~/R Dictory")
you will need the following packages
library(ggplot2)
library(hydroGOF)
## Warning: package 'hydroGOF' was built under R version 3.3.3
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 3.3.3
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(e1071)
## Warning: package 'e1071' was built under R version 3.3.3
#install.packages("hydroGOF")
The article studies the advantage of Support Vector Regression (SVR) over Simple Linear Regression (SLR) models. SVR uses the same basic idea as Support Vector Machine (SVM), a classification algorithm, but applies it to predict real values rather than a class. SVR acknowledges the presence of non-linearity in the data and provides a proficient prediction model.
prediction <- read.csv("svm.csv", header = TRUE)
head(prediction)
## X Y
## 1 1 12.7
## 2 2 12.7
## 3 3 12.3
## 4 4 11.5
## 5 5 10.9
## 6 6 10.7
ggplot(prediction, aes(X, Y))+
geom_point(shape = 1)
geom_smooth(method = lm)
## geom_smooth: na.rm = FALSE
## stat_smooth: na.rm = FALSE, method = function (formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL, offset, ...)
## {
## ret.x <- x
## ret.y <- y
## cl <- match.call()
## mf <- match.call(expand.dots = FALSE)
## m <- match(c("formula", "data", "subset", "weights", "na.action", "offset"), names(mf), 0)
## mf <- mf[c(1, m)]
## mf$drop.unused.levels <- TRUE
## mf[[1]] <- quote(stats::model.frame)
## mf <- eval(mf, parent.frame())
## if (method == "model.frame")
## return(mf)
## else if (method != "qr")
## warning(gettextf("method = '%s' is not supported. Using 'qr'", method), domain = NA)
## mt <- attr(mf, "terms")
## y <- model.response(mf, "numeric")
## w <- as.vector(model.weights(mf))
## if (!is.null(w) && !is.numeric(w))
## stop("'weights' must be a numeric vector")
## offset <- as.vector(model.offset(mf))
## if (!is.null(offset)) {
## if (length(offset) != NROW(y))
## stop(gettextf("number of offsets is %d, should equal %d (number of observations)", length(offset), NROW(y)), domain = NA)
## }
## if (is.empty.model(mt)) {
## x <- NULL
## z <- list(coefficients = if (is.matrix(y)) matrix(, 0, 3) else numeric(), residuals = y, fitted.values = 0 * y, weights = w, rank = 0, df.residual = if (!is.null(w)) sum(w != 0) else if (is.matrix(y)) nrow(y) else length(y))
## if (!is.null(offset)) {
## z$fitted.values <- offset
## z$residuals <- y - offset
## }
## }
## else {
## x <- model.matrix(mt, mf, contrasts)
## z <- if (is.null(w))
## lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
## else lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, ...)
## }
## class(z) <- c(if (is.matrix(y)) "mlm", "lm")
## z$na.action <- attr(mf, "na.action")
## z$offset <- offset
## z$contrasts <- attr(x, "contrasts")
## z$xlevels <- .getXlevels(mt, mf)
## z$call <- cl
## z$terms <- mt
## if (model)
## z$model <- mf
## if (ret.x)
## z$x <- x
## if (ret.y)
## z$y <- y
## if (!qr)
## z$qr <- NULL
## z
## }, formula = y ~ x, se = TRUE
## position_identity
model <- lm(Y~X, prediction)
model
##
## Call:
## lm(formula = Y ~ X, data = prediction)
##
## Coefficients:
## (Intercept) X
## 13.1823 -0.4449
plot(prediction, pch=16)
#calculating RMSE
PredY <- predict(model, prediction)
PredY
## 1 2 3 4 5 6
## 12.7373118 12.2923708 11.8474297 11.4024887 10.9575476 10.5126066
## 7 8 9 10 11 12
## 10.0676656 9.6227245 9.1777835 8.7328424 8.2879014 7.8429603
## 13 14 15 16 17 18
## 7.3980193 6.9530782 6.5081372 6.0631961 5.6182551 5.1733141
## 19 20 21 22 23 24
## 4.7283730 4.2834320 3.8384909 3.3935499 2.9486088 2.5036678
## 25 26 27 28 29 30
## 2.0587267 1.6137857 1.1688446 0.7239036 0.2789626 -0.1659785
#Overlay prediction 0n plot
plot(prediction, pch=16)
points(prediction$X, PredY, col = "red", pch =16)
Plot above provides a better understanding of RMSE. Yi and Yi in RMSE in graph are red and black dots respectively. The vertical distance between black and corresponding blue dot is the error term (??i). Let us now calculate RMSE for the linear model. In order to calculate RMSE in R, “hydroGOF” package is required
RMSE <- rmse(PredY, prediction$Y)
RMSE
## [1] 0.9410077
modelsvm <- svm(Y~X, prediction)
modelsvm
##
## Call:
## svm(formula = Y ~ X, data = prediction)
##
##
## Parameters:
## SVM-Type: eps-regression
## SVM-Kernel: radial
## cost: 1
## gamma: 1
## epsilon: 0.1
##
##
## Number of Support Vectors: 13
PredsvmY <- predict(modelsvm, prediction)
PredsvmY
## 1 2 3 4 5 6 7
## 12.034327 12.007507 11.897130 11.717600 11.480287 11.190317 10.845357
## 8 9 10 11 12 13 14
## 10.436868 9.953643 9.386759 8.734647 8.006825 7.225179 6.422237
## 15 16 17 18 19 20 21
## 5.636705 4.907244 4.265930 3.732941 3.313708 2.999129 2.768741
## 22 23 24 25 26 27 28
## 2.596023 2.454572 2.323778 2.192806 2.062177 1.942804 1.852898
## 29 30
## 1.813576 1.844176
plot (prediction)
points(prediction$X, PredsvmY, col="blue", pch=16)
RMSEsvm <- rmse(PredsvmY, prediction$Y)
RMSEsvm
## [1] 0.4339366
Given a non-linear relation between the variables of interest and difficulty in kernel selection, we would suggest the beginners to use RBF as the default kernel. The kernel function transforms our data from non-linear space to linear space. The kernel trick allows the SVR to find a fit and then data is mapped to the original space. Now let us represent the constructed SVR model:
Yi = W.k(xi,x) + b
##Calculate parameters of the SVR model
#Find value of W
W = t(modelsvm$coefs) %*% modelsvm$SV
#Find value of b
b = modelsvm$rho
print(b)
## [1] -0.06417474
Tuning SVR model by varying values of maximum allowable error and cost parameter
#Tune the SVM model
OptModelsvm <- tune(svm, Y~X, data=prediction,ranges=list(elsilon=seq(0,1,0.1), cost=1:100))
#Print optimum value of parameters
print(OptModelsvm)
##
## Parameter tuning of 'svm':
##
## - sampling method: 10-fold cross validation
##
## - best parameters:
## elsilon cost
## 0 8
##
## - best performance: 0.1091487
#Plot the perfrormance of SVM Regression model
plot(OptModelsvm)
The OptModelsvm has value of epsilon and cost at 0 and 100 respectively. The plot below visualizes the performance of each of the model. The legend on the right displays the value of Mean Square Error (MSE). MSE is defined as (RMSE)2 and is also a performance indicator.
Select the best model out of 1100 trained models and compute RMSE
Find out the best model
Bstmodelsvm <- OptModelsvm$best.model
#Predict Y using best model
PredYBst=predict(Bstmodelsvm,prediction)
#Calculate RMSE of the best model
RMSEBst=rmse(PredYBst,prediction$Y)
OptModelsvm$performances
## elsilon cost error dispersion
## 1 0.0 1 0.4431440 0.32359080
## 2 0.1 1 0.4431440 0.32359080
## 3 0.2 1 0.4431440 0.32359080
## 4 0.3 1 0.4431440 0.32359080
## 5 0.4 1 0.4431440 0.32359080
## 6 0.5 1 0.4431440 0.32359080
## 7 0.6 1 0.4431440 0.32359080
## 8 0.7 1 0.4431440 0.32359080
## 9 0.8 1 0.4431440 0.32359080
## 10 0.9 1 0.4431440 0.32359080
## 11 1.0 1 0.4431440 0.32359080
## 12 0.0 2 0.1896946 0.07866872
## 13 0.1 2 0.1896946 0.07866872
## 14 0.2 2 0.1896946 0.07866872
## 15 0.3 2 0.1896946 0.07866872
## 16 0.4 2 0.1896946 0.07866872
## 17 0.5 2 0.1896946 0.07866872
## 18 0.6 2 0.1896946 0.07866872
## 19 0.7 2 0.1896946 0.07866872
## 20 0.8 2 0.1896946 0.07866872
## 21 0.9 2 0.1896946 0.07866872
## 22 1.0 2 0.1896946 0.07866872
## 23 0.0 3 0.1674900 0.07505229
## 24 0.1 3 0.1674900 0.07505229
## 25 0.2 3 0.1674900 0.07505229
## 26 0.3 3 0.1674900 0.07505229
## 27 0.4 3 0.1674900 0.07505229
## 28 0.5 3 0.1674900 0.07505229
## 29 0.6 3 0.1674900 0.07505229
## 30 0.7 3 0.1674900 0.07505229
## 31 0.8 3 0.1674900 0.07505229
## 32 0.9 3 0.1674900 0.07505229
## 33 1.0 3 0.1674900 0.07505229
## 34 0.0 4 0.1361977 0.07877498
## 35 0.1 4 0.1361977 0.07877498
## 36 0.2 4 0.1361977 0.07877498
## 37 0.3 4 0.1361977 0.07877498
## 38 0.4 4 0.1361977 0.07877498
## 39 0.5 4 0.1361977 0.07877498
## 40 0.6 4 0.1361977 0.07877498
## 41 0.7 4 0.1361977 0.07877498
## 42 0.8 4 0.1361977 0.07877498
## 43 0.9 4 0.1361977 0.07877498
## 44 1.0 4 0.1361977 0.07877498
## 45 0.0 5 0.1177956 0.08059378
## 46 0.1 5 0.1177956 0.08059378
## 47 0.2 5 0.1177956 0.08059378
## 48 0.3 5 0.1177956 0.08059378
## 49 0.4 5 0.1177956 0.08059378
## 50 0.5 5 0.1177956 0.08059378
## 51 0.6 5 0.1177956 0.08059378
## 52 0.7 5 0.1177956 0.08059378
## 53 0.8 5 0.1177956 0.08059378
## 54 0.9 5 0.1177956 0.08059378
## 55 1.0 5 0.1177956 0.08059378
## 56 0.0 6 0.1153652 0.08213546
## 57 0.1 6 0.1153652 0.08213546
## 58 0.2 6 0.1153652 0.08213546
## 59 0.3 6 0.1153652 0.08213546
## 60 0.4 6 0.1153652 0.08213546
## 61 0.5 6 0.1153652 0.08213546
## 62 0.6 6 0.1153652 0.08213546
## 63 0.7 6 0.1153652 0.08213546
## 64 0.8 6 0.1153652 0.08213546
## 65 0.9 6 0.1153652 0.08213546
## 66 1.0 6 0.1153652 0.08213546
## 67 0.0 7 0.1125997 0.07968265
## 68 0.1 7 0.1125997 0.07968265
## 69 0.2 7 0.1125997 0.07968265
## 70 0.3 7 0.1125997 0.07968265
## 71 0.4 7 0.1125997 0.07968265
## 72 0.5 7 0.1125997 0.07968265
## 73 0.6 7 0.1125997 0.07968265
## 74 0.7 7 0.1125997 0.07968265
## 75 0.8 7 0.1125997 0.07968265
## 76 0.9 7 0.1125997 0.07968265
## 77 1.0 7 0.1125997 0.07968265
## 78 0.0 8 0.1091487 0.07848266
## 79 0.1 8 0.1091487 0.07848266
## 80 0.2 8 0.1091487 0.07848266
## 81 0.3 8 0.1091487 0.07848266
## 82 0.4 8 0.1091487 0.07848266
## 83 0.5 8 0.1091487 0.07848266
## 84 0.6 8 0.1091487 0.07848266
## 85 0.7 8 0.1091487 0.07848266
## 86 0.8 8 0.1091487 0.07848266
## 87 0.9 8 0.1091487 0.07848266
## 88 1.0 8 0.1091487 0.07848266
## 89 0.0 9 0.1091487 0.07848266
## 90 0.1 9 0.1091487 0.07848266
## 91 0.2 9 0.1091487 0.07848266
## 92 0.3 9 0.1091487 0.07848266
## 93 0.4 9 0.1091487 0.07848266
## 94 0.5 9 0.1091487 0.07848266
## 95 0.6 9 0.1091487 0.07848266
## 96 0.7 9 0.1091487 0.07848266
## 97 0.8 9 0.1091487 0.07848266
## 98 0.9 9 0.1091487 0.07848266
## 99 1.0 9 0.1091487 0.07848266
## 100 0.0 10 0.1091487 0.07848266
## 101 0.1 10 0.1091487 0.07848266
## 102 0.2 10 0.1091487 0.07848266
## 103 0.3 10 0.1091487 0.07848266
## 104 0.4 10 0.1091487 0.07848266
## 105 0.5 10 0.1091487 0.07848266
## 106 0.6 10 0.1091487 0.07848266
## 107 0.7 10 0.1091487 0.07848266
## 108 0.8 10 0.1091487 0.07848266
## 109 0.9 10 0.1091487 0.07848266
## 110 1.0 10 0.1091487 0.07848266
## 111 0.0 11 0.1091487 0.07848266
## 112 0.1 11 0.1091487 0.07848266
## 113 0.2 11 0.1091487 0.07848266
## 114 0.3 11 0.1091487 0.07848266
## 115 0.4 11 0.1091487 0.07848266
## 116 0.5 11 0.1091487 0.07848266
## 117 0.6 11 0.1091487 0.07848266
## 118 0.7 11 0.1091487 0.07848266
## 119 0.8 11 0.1091487 0.07848266
## 120 0.9 11 0.1091487 0.07848266
## 121 1.0 11 0.1091487 0.07848266
## 122 0.0 12 0.1091487 0.07848266
## 123 0.1 12 0.1091487 0.07848266
## 124 0.2 12 0.1091487 0.07848266
## 125 0.3 12 0.1091487 0.07848266
## 126 0.4 12 0.1091487 0.07848266
## 127 0.5 12 0.1091487 0.07848266
## 128 0.6 12 0.1091487 0.07848266
## 129 0.7 12 0.1091487 0.07848266
## 130 0.8 12 0.1091487 0.07848266
## 131 0.9 12 0.1091487 0.07848266
## 132 1.0 12 0.1091487 0.07848266
## 133 0.0 13 0.1091487 0.07848266
## 134 0.1 13 0.1091487 0.07848266
## 135 0.2 13 0.1091487 0.07848266
## 136 0.3 13 0.1091487 0.07848266
## 137 0.4 13 0.1091487 0.07848266
## 138 0.5 13 0.1091487 0.07848266
## 139 0.6 13 0.1091487 0.07848266
## 140 0.7 13 0.1091487 0.07848266
## 141 0.8 13 0.1091487 0.07848266
## 142 0.9 13 0.1091487 0.07848266
## 143 1.0 13 0.1091487 0.07848266
## 144 0.0 14 0.1091487 0.07848266
## 145 0.1 14 0.1091487 0.07848266
## 146 0.2 14 0.1091487 0.07848266
## 147 0.3 14 0.1091487 0.07848266
## 148 0.4 14 0.1091487 0.07848266
## 149 0.5 14 0.1091487 0.07848266
## 150 0.6 14 0.1091487 0.07848266
## 151 0.7 14 0.1091487 0.07848266
## 152 0.8 14 0.1091487 0.07848266
## 153 0.9 14 0.1091487 0.07848266
## 154 1.0 14 0.1091487 0.07848266
## 155 0.0 15 0.1091487 0.07848266
## 156 0.1 15 0.1091487 0.07848266
## 157 0.2 15 0.1091487 0.07848266
## 158 0.3 15 0.1091487 0.07848266
## 159 0.4 15 0.1091487 0.07848266
## 160 0.5 15 0.1091487 0.07848266
## 161 0.6 15 0.1091487 0.07848266
## 162 0.7 15 0.1091487 0.07848266
## 163 0.8 15 0.1091487 0.07848266
## 164 0.9 15 0.1091487 0.07848266
## 165 1.0 15 0.1091487 0.07848266
## 166 0.0 16 0.1091487 0.07848266
## 167 0.1 16 0.1091487 0.07848266
## 168 0.2 16 0.1091487 0.07848266
## 169 0.3 16 0.1091487 0.07848266
## 170 0.4 16 0.1091487 0.07848266
## 171 0.5 16 0.1091487 0.07848266
## 172 0.6 16 0.1091487 0.07848266
## 173 0.7 16 0.1091487 0.07848266
## 174 0.8 16 0.1091487 0.07848266
## 175 0.9 16 0.1091487 0.07848266
## 176 1.0 16 0.1091487 0.07848266
## 177 0.0 17 0.1091487 0.07848266
## 178 0.1 17 0.1091487 0.07848266
## 179 0.2 17 0.1091487 0.07848266
## 180 0.3 17 0.1091487 0.07848266
## 181 0.4 17 0.1091487 0.07848266
## 182 0.5 17 0.1091487 0.07848266
## 183 0.6 17 0.1091487 0.07848266
## 184 0.7 17 0.1091487 0.07848266
## 185 0.8 17 0.1091487 0.07848266
## 186 0.9 17 0.1091487 0.07848266
## 187 1.0 17 0.1091487 0.07848266
## 188 0.0 18 0.1091487 0.07848266
## 189 0.1 18 0.1091487 0.07848266
## 190 0.2 18 0.1091487 0.07848266
## 191 0.3 18 0.1091487 0.07848266
## 192 0.4 18 0.1091487 0.07848266
## 193 0.5 18 0.1091487 0.07848266
## 194 0.6 18 0.1091487 0.07848266
## 195 0.7 18 0.1091487 0.07848266
## 196 0.8 18 0.1091487 0.07848266
## 197 0.9 18 0.1091487 0.07848266
## 198 1.0 18 0.1091487 0.07848266
## 199 0.0 19 0.1091487 0.07848266
## 200 0.1 19 0.1091487 0.07848266
## 201 0.2 19 0.1091487 0.07848266
## 202 0.3 19 0.1091487 0.07848266
## 203 0.4 19 0.1091487 0.07848266
## 204 0.5 19 0.1091487 0.07848266
## 205 0.6 19 0.1091487 0.07848266
## 206 0.7 19 0.1091487 0.07848266
## 207 0.8 19 0.1091487 0.07848266
## 208 0.9 19 0.1091487 0.07848266
## 209 1.0 19 0.1091487 0.07848266
## 210 0.0 20 0.1091487 0.07848266
## 211 0.1 20 0.1091487 0.07848266
## 212 0.2 20 0.1091487 0.07848266
## 213 0.3 20 0.1091487 0.07848266
## 214 0.4 20 0.1091487 0.07848266
## 215 0.5 20 0.1091487 0.07848266
## 216 0.6 20 0.1091487 0.07848266
## 217 0.7 20 0.1091487 0.07848266
## 218 0.8 20 0.1091487 0.07848266
## 219 0.9 20 0.1091487 0.07848266
## 220 1.0 20 0.1091487 0.07848266
## 221 0.0 21 0.1091487 0.07848266
## 222 0.1 21 0.1091487 0.07848266
## 223 0.2 21 0.1091487 0.07848266
## 224 0.3 21 0.1091487 0.07848266
## 225 0.4 21 0.1091487 0.07848266
## 226 0.5 21 0.1091487 0.07848266
## 227 0.6 21 0.1091487 0.07848266
## 228 0.7 21 0.1091487 0.07848266
## 229 0.8 21 0.1091487 0.07848266
## 230 0.9 21 0.1091487 0.07848266
## 231 1.0 21 0.1091487 0.07848266
## 232 0.0 22 0.1091487 0.07848266
## 233 0.1 22 0.1091487 0.07848266
## 234 0.2 22 0.1091487 0.07848266
## 235 0.3 22 0.1091487 0.07848266
## 236 0.4 22 0.1091487 0.07848266
## 237 0.5 22 0.1091487 0.07848266
## 238 0.6 22 0.1091487 0.07848266
## 239 0.7 22 0.1091487 0.07848266
## 240 0.8 22 0.1091487 0.07848266
## 241 0.9 22 0.1091487 0.07848266
## 242 1.0 22 0.1091487 0.07848266
## 243 0.0 23 0.1091487 0.07848266
## 244 0.1 23 0.1091487 0.07848266
## 245 0.2 23 0.1091487 0.07848266
## 246 0.3 23 0.1091487 0.07848266
## 247 0.4 23 0.1091487 0.07848266
## 248 0.5 23 0.1091487 0.07848266
## 249 0.6 23 0.1091487 0.07848266
## 250 0.7 23 0.1091487 0.07848266
## 251 0.8 23 0.1091487 0.07848266
## 252 0.9 23 0.1091487 0.07848266
## 253 1.0 23 0.1091487 0.07848266
## 254 0.0 24 0.1091487 0.07848266
## 255 0.1 24 0.1091487 0.07848266
## 256 0.2 24 0.1091487 0.07848266
## 257 0.3 24 0.1091487 0.07848266
## 258 0.4 24 0.1091487 0.07848266
## 259 0.5 24 0.1091487 0.07848266
## 260 0.6 24 0.1091487 0.07848266
## 261 0.7 24 0.1091487 0.07848266
## 262 0.8 24 0.1091487 0.07848266
## 263 0.9 24 0.1091487 0.07848266
## 264 1.0 24 0.1091487 0.07848266
## 265 0.0 25 0.1091487 0.07848266
## 266 0.1 25 0.1091487 0.07848266
## 267 0.2 25 0.1091487 0.07848266
## 268 0.3 25 0.1091487 0.07848266
## 269 0.4 25 0.1091487 0.07848266
## 270 0.5 25 0.1091487 0.07848266
## 271 0.6 25 0.1091487 0.07848266
## 272 0.7 25 0.1091487 0.07848266
## 273 0.8 25 0.1091487 0.07848266
## 274 0.9 25 0.1091487 0.07848266
## 275 1.0 25 0.1091487 0.07848266
## 276 0.0 26 0.1091487 0.07848266
## 277 0.1 26 0.1091487 0.07848266
## 278 0.2 26 0.1091487 0.07848266
## 279 0.3 26 0.1091487 0.07848266
## 280 0.4 26 0.1091487 0.07848266
## 281 0.5 26 0.1091487 0.07848266
## 282 0.6 26 0.1091487 0.07848266
## 283 0.7 26 0.1091487 0.07848266
## 284 0.8 26 0.1091487 0.07848266
## 285 0.9 26 0.1091487 0.07848266
## 286 1.0 26 0.1091487 0.07848266
## 287 0.0 27 0.1091487 0.07848266
## 288 0.1 27 0.1091487 0.07848266
## 289 0.2 27 0.1091487 0.07848266
## 290 0.3 27 0.1091487 0.07848266
## 291 0.4 27 0.1091487 0.07848266
## 292 0.5 27 0.1091487 0.07848266
## 293 0.6 27 0.1091487 0.07848266
## 294 0.7 27 0.1091487 0.07848266
## 295 0.8 27 0.1091487 0.07848266
## 296 0.9 27 0.1091487 0.07848266
## 297 1.0 27 0.1091487 0.07848266
## 298 0.0 28 0.1091487 0.07848266
## 299 0.1 28 0.1091487 0.07848266
## 300 0.2 28 0.1091487 0.07848266
## 301 0.3 28 0.1091487 0.07848266
## 302 0.4 28 0.1091487 0.07848266
## 303 0.5 28 0.1091487 0.07848266
## 304 0.6 28 0.1091487 0.07848266
## 305 0.7 28 0.1091487 0.07848266
## 306 0.8 28 0.1091487 0.07848266
## 307 0.9 28 0.1091487 0.07848266
## 308 1.0 28 0.1091487 0.07848266
## 309 0.0 29 0.1091487 0.07848266
## 310 0.1 29 0.1091487 0.07848266
## 311 0.2 29 0.1091487 0.07848266
## 312 0.3 29 0.1091487 0.07848266
## 313 0.4 29 0.1091487 0.07848266
## 314 0.5 29 0.1091487 0.07848266
## 315 0.6 29 0.1091487 0.07848266
## 316 0.7 29 0.1091487 0.07848266
## 317 0.8 29 0.1091487 0.07848266
## 318 0.9 29 0.1091487 0.07848266
## 319 1.0 29 0.1091487 0.07848266
## 320 0.0 30 0.1091487 0.07848266
## 321 0.1 30 0.1091487 0.07848266
## 322 0.2 30 0.1091487 0.07848266
## 323 0.3 30 0.1091487 0.07848266
## 324 0.4 30 0.1091487 0.07848266
## 325 0.5 30 0.1091487 0.07848266
## 326 0.6 30 0.1091487 0.07848266
## 327 0.7 30 0.1091487 0.07848266
## 328 0.8 30 0.1091487 0.07848266
## 329 0.9 30 0.1091487 0.07848266
## 330 1.0 30 0.1091487 0.07848266
## 331 0.0 31 0.1091487 0.07848266
## 332 0.1 31 0.1091487 0.07848266
## 333 0.2 31 0.1091487 0.07848266
## 334 0.3 31 0.1091487 0.07848266
## 335 0.4 31 0.1091487 0.07848266
## 336 0.5 31 0.1091487 0.07848266
## 337 0.6 31 0.1091487 0.07848266
## 338 0.7 31 0.1091487 0.07848266
## 339 0.8 31 0.1091487 0.07848266
## 340 0.9 31 0.1091487 0.07848266
## 341 1.0 31 0.1091487 0.07848266
## 342 0.0 32 0.1091487 0.07848266
## 343 0.1 32 0.1091487 0.07848266
## 344 0.2 32 0.1091487 0.07848266
## 345 0.3 32 0.1091487 0.07848266
## 346 0.4 32 0.1091487 0.07848266
## 347 0.5 32 0.1091487 0.07848266
## 348 0.6 32 0.1091487 0.07848266
## 349 0.7 32 0.1091487 0.07848266
## 350 0.8 32 0.1091487 0.07848266
## 351 0.9 32 0.1091487 0.07848266
## 352 1.0 32 0.1091487 0.07848266
## 353 0.0 33 0.1091487 0.07848266
## 354 0.1 33 0.1091487 0.07848266
## 355 0.2 33 0.1091487 0.07848266
## 356 0.3 33 0.1091487 0.07848266
## 357 0.4 33 0.1091487 0.07848266
## 358 0.5 33 0.1091487 0.07848266
## 359 0.6 33 0.1091487 0.07848266
## 360 0.7 33 0.1091487 0.07848266
## 361 0.8 33 0.1091487 0.07848266
## 362 0.9 33 0.1091487 0.07848266
## 363 1.0 33 0.1091487 0.07848266
## 364 0.0 34 0.1091487 0.07848266
## 365 0.1 34 0.1091487 0.07848266
## 366 0.2 34 0.1091487 0.07848266
## 367 0.3 34 0.1091487 0.07848266
## 368 0.4 34 0.1091487 0.07848266
## 369 0.5 34 0.1091487 0.07848266
## 370 0.6 34 0.1091487 0.07848266
## 371 0.7 34 0.1091487 0.07848266
## 372 0.8 34 0.1091487 0.07848266
## 373 0.9 34 0.1091487 0.07848266
## 374 1.0 34 0.1091487 0.07848266
## 375 0.0 35 0.1091487 0.07848266
## 376 0.1 35 0.1091487 0.07848266
## 377 0.2 35 0.1091487 0.07848266
## 378 0.3 35 0.1091487 0.07848266
## 379 0.4 35 0.1091487 0.07848266
## 380 0.5 35 0.1091487 0.07848266
## 381 0.6 35 0.1091487 0.07848266
## 382 0.7 35 0.1091487 0.07848266
## 383 0.8 35 0.1091487 0.07848266
## 384 0.9 35 0.1091487 0.07848266
## 385 1.0 35 0.1091487 0.07848266
## 386 0.0 36 0.1091487 0.07848266
## 387 0.1 36 0.1091487 0.07848266
## 388 0.2 36 0.1091487 0.07848266
## 389 0.3 36 0.1091487 0.07848266
## 390 0.4 36 0.1091487 0.07848266
## 391 0.5 36 0.1091487 0.07848266
## 392 0.6 36 0.1091487 0.07848266
## 393 0.7 36 0.1091487 0.07848266
## 394 0.8 36 0.1091487 0.07848266
## 395 0.9 36 0.1091487 0.07848266
## 396 1.0 36 0.1091487 0.07848266
## 397 0.0 37 0.1091487 0.07848266
## 398 0.1 37 0.1091487 0.07848266
## 399 0.2 37 0.1091487 0.07848266
## 400 0.3 37 0.1091487 0.07848266
## 401 0.4 37 0.1091487 0.07848266
## 402 0.5 37 0.1091487 0.07848266
## 403 0.6 37 0.1091487 0.07848266
## 404 0.7 37 0.1091487 0.07848266
## 405 0.8 37 0.1091487 0.07848266
## 406 0.9 37 0.1091487 0.07848266
## 407 1.0 37 0.1091487 0.07848266
## 408 0.0 38 0.1091487 0.07848266
## 409 0.1 38 0.1091487 0.07848266
## 410 0.2 38 0.1091487 0.07848266
## 411 0.3 38 0.1091487 0.07848266
## 412 0.4 38 0.1091487 0.07848266
## 413 0.5 38 0.1091487 0.07848266
## 414 0.6 38 0.1091487 0.07848266
## 415 0.7 38 0.1091487 0.07848266
## 416 0.8 38 0.1091487 0.07848266
## 417 0.9 38 0.1091487 0.07848266
## 418 1.0 38 0.1091487 0.07848266
## 419 0.0 39 0.1091487 0.07848266
## 420 0.1 39 0.1091487 0.07848266
## 421 0.2 39 0.1091487 0.07848266
## 422 0.3 39 0.1091487 0.07848266
## 423 0.4 39 0.1091487 0.07848266
## 424 0.5 39 0.1091487 0.07848266
## 425 0.6 39 0.1091487 0.07848266
## 426 0.7 39 0.1091487 0.07848266
## 427 0.8 39 0.1091487 0.07848266
## 428 0.9 39 0.1091487 0.07848266
## 429 1.0 39 0.1091487 0.07848266
## 430 0.0 40 0.1091487 0.07848266
## 431 0.1 40 0.1091487 0.07848266
## 432 0.2 40 0.1091487 0.07848266
## 433 0.3 40 0.1091487 0.07848266
## 434 0.4 40 0.1091487 0.07848266
## 435 0.5 40 0.1091487 0.07848266
## 436 0.6 40 0.1091487 0.07848266
## 437 0.7 40 0.1091487 0.07848266
## 438 0.8 40 0.1091487 0.07848266
## 439 0.9 40 0.1091487 0.07848266
## 440 1.0 40 0.1091487 0.07848266
## 441 0.0 41 0.1091487 0.07848266
## 442 0.1 41 0.1091487 0.07848266
## 443 0.2 41 0.1091487 0.07848266
## 444 0.3 41 0.1091487 0.07848266
## 445 0.4 41 0.1091487 0.07848266
## 446 0.5 41 0.1091487 0.07848266
## 447 0.6 41 0.1091487 0.07848266
## 448 0.7 41 0.1091487 0.07848266
## 449 0.8 41 0.1091487 0.07848266
## 450 0.9 41 0.1091487 0.07848266
## 451 1.0 41 0.1091487 0.07848266
## 452 0.0 42 0.1091487 0.07848266
## 453 0.1 42 0.1091487 0.07848266
## 454 0.2 42 0.1091487 0.07848266
## 455 0.3 42 0.1091487 0.07848266
## 456 0.4 42 0.1091487 0.07848266
## 457 0.5 42 0.1091487 0.07848266
## 458 0.6 42 0.1091487 0.07848266
## 459 0.7 42 0.1091487 0.07848266
## 460 0.8 42 0.1091487 0.07848266
## 461 0.9 42 0.1091487 0.07848266
## 462 1.0 42 0.1091487 0.07848266
## 463 0.0 43 0.1091487 0.07848266
## 464 0.1 43 0.1091487 0.07848266
## 465 0.2 43 0.1091487 0.07848266
## 466 0.3 43 0.1091487 0.07848266
## 467 0.4 43 0.1091487 0.07848266
## 468 0.5 43 0.1091487 0.07848266
## 469 0.6 43 0.1091487 0.07848266
## 470 0.7 43 0.1091487 0.07848266
## 471 0.8 43 0.1091487 0.07848266
## 472 0.9 43 0.1091487 0.07848266
## 473 1.0 43 0.1091487 0.07848266
## 474 0.0 44 0.1091487 0.07848266
## 475 0.1 44 0.1091487 0.07848266
## 476 0.2 44 0.1091487 0.07848266
## 477 0.3 44 0.1091487 0.07848266
## 478 0.4 44 0.1091487 0.07848266
## 479 0.5 44 0.1091487 0.07848266
## 480 0.6 44 0.1091487 0.07848266
## 481 0.7 44 0.1091487 0.07848266
## 482 0.8 44 0.1091487 0.07848266
## 483 0.9 44 0.1091487 0.07848266
## 484 1.0 44 0.1091487 0.07848266
## 485 0.0 45 0.1091487 0.07848266
## 486 0.1 45 0.1091487 0.07848266
## 487 0.2 45 0.1091487 0.07848266
## 488 0.3 45 0.1091487 0.07848266
## 489 0.4 45 0.1091487 0.07848266
## 490 0.5 45 0.1091487 0.07848266
## 491 0.6 45 0.1091487 0.07848266
## 492 0.7 45 0.1091487 0.07848266
## 493 0.8 45 0.1091487 0.07848266
## 494 0.9 45 0.1091487 0.07848266
## 495 1.0 45 0.1091487 0.07848266
## 496 0.0 46 0.1091487 0.07848266
## 497 0.1 46 0.1091487 0.07848266
## 498 0.2 46 0.1091487 0.07848266
## 499 0.3 46 0.1091487 0.07848266
## 500 0.4 46 0.1091487 0.07848266
## 501 0.5 46 0.1091487 0.07848266
## 502 0.6 46 0.1091487 0.07848266
## 503 0.7 46 0.1091487 0.07848266
## 504 0.8 46 0.1091487 0.07848266
## 505 0.9 46 0.1091487 0.07848266
## 506 1.0 46 0.1091487 0.07848266
## 507 0.0 47 0.1091487 0.07848266
## 508 0.1 47 0.1091487 0.07848266
## 509 0.2 47 0.1091487 0.07848266
## 510 0.3 47 0.1091487 0.07848266
## 511 0.4 47 0.1091487 0.07848266
## 512 0.5 47 0.1091487 0.07848266
## 513 0.6 47 0.1091487 0.07848266
## 514 0.7 47 0.1091487 0.07848266
## 515 0.8 47 0.1091487 0.07848266
## 516 0.9 47 0.1091487 0.07848266
## 517 1.0 47 0.1091487 0.07848266
## 518 0.0 48 0.1091487 0.07848266
## 519 0.1 48 0.1091487 0.07848266
## 520 0.2 48 0.1091487 0.07848266
## 521 0.3 48 0.1091487 0.07848266
## 522 0.4 48 0.1091487 0.07848266
## 523 0.5 48 0.1091487 0.07848266
## 524 0.6 48 0.1091487 0.07848266
## 525 0.7 48 0.1091487 0.07848266
## 526 0.8 48 0.1091487 0.07848266
## 527 0.9 48 0.1091487 0.07848266
## 528 1.0 48 0.1091487 0.07848266
## 529 0.0 49 0.1091487 0.07848266
## 530 0.1 49 0.1091487 0.07848266
## 531 0.2 49 0.1091487 0.07848266
## 532 0.3 49 0.1091487 0.07848266
## 533 0.4 49 0.1091487 0.07848266
## 534 0.5 49 0.1091487 0.07848266
## 535 0.6 49 0.1091487 0.07848266
## 536 0.7 49 0.1091487 0.07848266
## 537 0.8 49 0.1091487 0.07848266
## 538 0.9 49 0.1091487 0.07848266
## 539 1.0 49 0.1091487 0.07848266
## 540 0.0 50 0.1091487 0.07848266
## 541 0.1 50 0.1091487 0.07848266
## 542 0.2 50 0.1091487 0.07848266
## 543 0.3 50 0.1091487 0.07848266
## 544 0.4 50 0.1091487 0.07848266
## 545 0.5 50 0.1091487 0.07848266
## 546 0.6 50 0.1091487 0.07848266
## 547 0.7 50 0.1091487 0.07848266
## 548 0.8 50 0.1091487 0.07848266
## 549 0.9 50 0.1091487 0.07848266
## 550 1.0 50 0.1091487 0.07848266
## 551 0.0 51 0.1091487 0.07848266
## 552 0.1 51 0.1091487 0.07848266
## 553 0.2 51 0.1091487 0.07848266
## 554 0.3 51 0.1091487 0.07848266
## 555 0.4 51 0.1091487 0.07848266
## 556 0.5 51 0.1091487 0.07848266
## 557 0.6 51 0.1091487 0.07848266
## 558 0.7 51 0.1091487 0.07848266
## 559 0.8 51 0.1091487 0.07848266
## 560 0.9 51 0.1091487 0.07848266
## 561 1.0 51 0.1091487 0.07848266
## 562 0.0 52 0.1091487 0.07848266
## 563 0.1 52 0.1091487 0.07848266
## 564 0.2 52 0.1091487 0.07848266
## 565 0.3 52 0.1091487 0.07848266
## 566 0.4 52 0.1091487 0.07848266
## 567 0.5 52 0.1091487 0.07848266
## 568 0.6 52 0.1091487 0.07848266
## 569 0.7 52 0.1091487 0.07848266
## 570 0.8 52 0.1091487 0.07848266
## 571 0.9 52 0.1091487 0.07848266
## 572 1.0 52 0.1091487 0.07848266
## 573 0.0 53 0.1091487 0.07848266
## 574 0.1 53 0.1091487 0.07848266
## 575 0.2 53 0.1091487 0.07848266
## 576 0.3 53 0.1091487 0.07848266
## 577 0.4 53 0.1091487 0.07848266
## 578 0.5 53 0.1091487 0.07848266
## 579 0.6 53 0.1091487 0.07848266
## 580 0.7 53 0.1091487 0.07848266
## 581 0.8 53 0.1091487 0.07848266
## 582 0.9 53 0.1091487 0.07848266
## 583 1.0 53 0.1091487 0.07848266
## 584 0.0 54 0.1091487 0.07848266
## 585 0.1 54 0.1091487 0.07848266
## 586 0.2 54 0.1091487 0.07848266
## 587 0.3 54 0.1091487 0.07848266
## 588 0.4 54 0.1091487 0.07848266
## 589 0.5 54 0.1091487 0.07848266
## 590 0.6 54 0.1091487 0.07848266
## 591 0.7 54 0.1091487 0.07848266
## 592 0.8 54 0.1091487 0.07848266
## 593 0.9 54 0.1091487 0.07848266
## 594 1.0 54 0.1091487 0.07848266
## 595 0.0 55 0.1091487 0.07848266
## 596 0.1 55 0.1091487 0.07848266
## 597 0.2 55 0.1091487 0.07848266
## 598 0.3 55 0.1091487 0.07848266
## 599 0.4 55 0.1091487 0.07848266
## 600 0.5 55 0.1091487 0.07848266
## 601 0.6 55 0.1091487 0.07848266
## 602 0.7 55 0.1091487 0.07848266
## 603 0.8 55 0.1091487 0.07848266
## 604 0.9 55 0.1091487 0.07848266
## 605 1.0 55 0.1091487 0.07848266
## 606 0.0 56 0.1091487 0.07848266
## 607 0.1 56 0.1091487 0.07848266
## 608 0.2 56 0.1091487 0.07848266
## 609 0.3 56 0.1091487 0.07848266
## 610 0.4 56 0.1091487 0.07848266
## 611 0.5 56 0.1091487 0.07848266
## 612 0.6 56 0.1091487 0.07848266
## 613 0.7 56 0.1091487 0.07848266
## 614 0.8 56 0.1091487 0.07848266
## 615 0.9 56 0.1091487 0.07848266
## 616 1.0 56 0.1091487 0.07848266
## 617 0.0 57 0.1091487 0.07848266
## 618 0.1 57 0.1091487 0.07848266
## 619 0.2 57 0.1091487 0.07848266
## 620 0.3 57 0.1091487 0.07848266
## 621 0.4 57 0.1091487 0.07848266
## 622 0.5 57 0.1091487 0.07848266
## 623 0.6 57 0.1091487 0.07848266
## 624 0.7 57 0.1091487 0.07848266
## 625 0.8 57 0.1091487 0.07848266
## 626 0.9 57 0.1091487 0.07848266
## 627 1.0 57 0.1091487 0.07848266
## 628 0.0 58 0.1091487 0.07848266
## 629 0.1 58 0.1091487 0.07848266
## 630 0.2 58 0.1091487 0.07848266
## 631 0.3 58 0.1091487 0.07848266
## 632 0.4 58 0.1091487 0.07848266
## 633 0.5 58 0.1091487 0.07848266
## 634 0.6 58 0.1091487 0.07848266
## 635 0.7 58 0.1091487 0.07848266
## 636 0.8 58 0.1091487 0.07848266
## 637 0.9 58 0.1091487 0.07848266
## 638 1.0 58 0.1091487 0.07848266
## 639 0.0 59 0.1091487 0.07848266
## 640 0.1 59 0.1091487 0.07848266
## 641 0.2 59 0.1091487 0.07848266
## 642 0.3 59 0.1091487 0.07848266
## 643 0.4 59 0.1091487 0.07848266
## 644 0.5 59 0.1091487 0.07848266
## 645 0.6 59 0.1091487 0.07848266
## 646 0.7 59 0.1091487 0.07848266
## 647 0.8 59 0.1091487 0.07848266
## 648 0.9 59 0.1091487 0.07848266
## 649 1.0 59 0.1091487 0.07848266
## 650 0.0 60 0.1091487 0.07848266
## 651 0.1 60 0.1091487 0.07848266
## 652 0.2 60 0.1091487 0.07848266
## 653 0.3 60 0.1091487 0.07848266
## 654 0.4 60 0.1091487 0.07848266
## 655 0.5 60 0.1091487 0.07848266
## 656 0.6 60 0.1091487 0.07848266
## 657 0.7 60 0.1091487 0.07848266
## 658 0.8 60 0.1091487 0.07848266
## 659 0.9 60 0.1091487 0.07848266
## 660 1.0 60 0.1091487 0.07848266
## 661 0.0 61 0.1091487 0.07848266
## 662 0.1 61 0.1091487 0.07848266
## 663 0.2 61 0.1091487 0.07848266
## 664 0.3 61 0.1091487 0.07848266
## 665 0.4 61 0.1091487 0.07848266
## 666 0.5 61 0.1091487 0.07848266
## 667 0.6 61 0.1091487 0.07848266
## 668 0.7 61 0.1091487 0.07848266
## 669 0.8 61 0.1091487 0.07848266
## 670 0.9 61 0.1091487 0.07848266
## 671 1.0 61 0.1091487 0.07848266
## 672 0.0 62 0.1091487 0.07848266
## 673 0.1 62 0.1091487 0.07848266
## 674 0.2 62 0.1091487 0.07848266
## 675 0.3 62 0.1091487 0.07848266
## 676 0.4 62 0.1091487 0.07848266
## 677 0.5 62 0.1091487 0.07848266
## 678 0.6 62 0.1091487 0.07848266
## 679 0.7 62 0.1091487 0.07848266
## 680 0.8 62 0.1091487 0.07848266
## 681 0.9 62 0.1091487 0.07848266
## 682 1.0 62 0.1091487 0.07848266
## 683 0.0 63 0.1091487 0.07848266
## 684 0.1 63 0.1091487 0.07848266
## 685 0.2 63 0.1091487 0.07848266
## 686 0.3 63 0.1091487 0.07848266
## 687 0.4 63 0.1091487 0.07848266
## 688 0.5 63 0.1091487 0.07848266
## 689 0.6 63 0.1091487 0.07848266
## 690 0.7 63 0.1091487 0.07848266
## 691 0.8 63 0.1091487 0.07848266
## 692 0.9 63 0.1091487 0.07848266
## 693 1.0 63 0.1091487 0.07848266
## 694 0.0 64 0.1091487 0.07848266
## 695 0.1 64 0.1091487 0.07848266
## 696 0.2 64 0.1091487 0.07848266
## 697 0.3 64 0.1091487 0.07848266
## 698 0.4 64 0.1091487 0.07848266
## 699 0.5 64 0.1091487 0.07848266
## 700 0.6 64 0.1091487 0.07848266
## 701 0.7 64 0.1091487 0.07848266
## 702 0.8 64 0.1091487 0.07848266
## 703 0.9 64 0.1091487 0.07848266
## 704 1.0 64 0.1091487 0.07848266
## 705 0.0 65 0.1091487 0.07848266
## 706 0.1 65 0.1091487 0.07848266
## 707 0.2 65 0.1091487 0.07848266
## 708 0.3 65 0.1091487 0.07848266
## 709 0.4 65 0.1091487 0.07848266
## 710 0.5 65 0.1091487 0.07848266
## 711 0.6 65 0.1091487 0.07848266
## 712 0.7 65 0.1091487 0.07848266
## 713 0.8 65 0.1091487 0.07848266
## 714 0.9 65 0.1091487 0.07848266
## 715 1.0 65 0.1091487 0.07848266
## 716 0.0 66 0.1091487 0.07848266
## 717 0.1 66 0.1091487 0.07848266
## 718 0.2 66 0.1091487 0.07848266
## 719 0.3 66 0.1091487 0.07848266
## 720 0.4 66 0.1091487 0.07848266
## 721 0.5 66 0.1091487 0.07848266
## 722 0.6 66 0.1091487 0.07848266
## 723 0.7 66 0.1091487 0.07848266
## 724 0.8 66 0.1091487 0.07848266
## 725 0.9 66 0.1091487 0.07848266
## 726 1.0 66 0.1091487 0.07848266
## 727 0.0 67 0.1091487 0.07848266
## 728 0.1 67 0.1091487 0.07848266
## 729 0.2 67 0.1091487 0.07848266
## 730 0.3 67 0.1091487 0.07848266
## 731 0.4 67 0.1091487 0.07848266
## 732 0.5 67 0.1091487 0.07848266
## 733 0.6 67 0.1091487 0.07848266
## 734 0.7 67 0.1091487 0.07848266
## 735 0.8 67 0.1091487 0.07848266
## 736 0.9 67 0.1091487 0.07848266
## 737 1.0 67 0.1091487 0.07848266
## 738 0.0 68 0.1091487 0.07848266
## 739 0.1 68 0.1091487 0.07848266
## 740 0.2 68 0.1091487 0.07848266
## 741 0.3 68 0.1091487 0.07848266
## 742 0.4 68 0.1091487 0.07848266
## 743 0.5 68 0.1091487 0.07848266
## 744 0.6 68 0.1091487 0.07848266
## 745 0.7 68 0.1091487 0.07848266
## 746 0.8 68 0.1091487 0.07848266
## 747 0.9 68 0.1091487 0.07848266
## 748 1.0 68 0.1091487 0.07848266
## 749 0.0 69 0.1091487 0.07848266
## 750 0.1 69 0.1091487 0.07848266
## 751 0.2 69 0.1091487 0.07848266
## 752 0.3 69 0.1091487 0.07848266
## 753 0.4 69 0.1091487 0.07848266
## 754 0.5 69 0.1091487 0.07848266
## 755 0.6 69 0.1091487 0.07848266
## 756 0.7 69 0.1091487 0.07848266
## 757 0.8 69 0.1091487 0.07848266
## 758 0.9 69 0.1091487 0.07848266
## 759 1.0 69 0.1091487 0.07848266
## 760 0.0 70 0.1091487 0.07848266
## 761 0.1 70 0.1091487 0.07848266
## 762 0.2 70 0.1091487 0.07848266
## 763 0.3 70 0.1091487 0.07848266
## 764 0.4 70 0.1091487 0.07848266
## 765 0.5 70 0.1091487 0.07848266
## 766 0.6 70 0.1091487 0.07848266
## 767 0.7 70 0.1091487 0.07848266
## 768 0.8 70 0.1091487 0.07848266
## 769 0.9 70 0.1091487 0.07848266
## 770 1.0 70 0.1091487 0.07848266
## 771 0.0 71 0.1091487 0.07848266
## 772 0.1 71 0.1091487 0.07848266
## 773 0.2 71 0.1091487 0.07848266
## 774 0.3 71 0.1091487 0.07848266
## 775 0.4 71 0.1091487 0.07848266
## 776 0.5 71 0.1091487 0.07848266
## 777 0.6 71 0.1091487 0.07848266
## 778 0.7 71 0.1091487 0.07848266
## 779 0.8 71 0.1091487 0.07848266
## 780 0.9 71 0.1091487 0.07848266
## 781 1.0 71 0.1091487 0.07848266
## 782 0.0 72 0.1091487 0.07848266
## 783 0.1 72 0.1091487 0.07848266
## 784 0.2 72 0.1091487 0.07848266
## 785 0.3 72 0.1091487 0.07848266
## 786 0.4 72 0.1091487 0.07848266
## 787 0.5 72 0.1091487 0.07848266
## 788 0.6 72 0.1091487 0.07848266
## 789 0.7 72 0.1091487 0.07848266
## 790 0.8 72 0.1091487 0.07848266
## 791 0.9 72 0.1091487 0.07848266
## 792 1.0 72 0.1091487 0.07848266
## 793 0.0 73 0.1091487 0.07848266
## 794 0.1 73 0.1091487 0.07848266
## 795 0.2 73 0.1091487 0.07848266
## 796 0.3 73 0.1091487 0.07848266
## 797 0.4 73 0.1091487 0.07848266
## 798 0.5 73 0.1091487 0.07848266
## 799 0.6 73 0.1091487 0.07848266
## 800 0.7 73 0.1091487 0.07848266
## 801 0.8 73 0.1091487 0.07848266
## 802 0.9 73 0.1091487 0.07848266
## 803 1.0 73 0.1091487 0.07848266
## 804 0.0 74 0.1091487 0.07848266
## 805 0.1 74 0.1091487 0.07848266
## 806 0.2 74 0.1091487 0.07848266
## 807 0.3 74 0.1091487 0.07848266
## 808 0.4 74 0.1091487 0.07848266
## 809 0.5 74 0.1091487 0.07848266
## 810 0.6 74 0.1091487 0.07848266
## 811 0.7 74 0.1091487 0.07848266
## 812 0.8 74 0.1091487 0.07848266
## 813 0.9 74 0.1091487 0.07848266
## 814 1.0 74 0.1091487 0.07848266
## 815 0.0 75 0.1091487 0.07848266
## 816 0.1 75 0.1091487 0.07848266
## 817 0.2 75 0.1091487 0.07848266
## 818 0.3 75 0.1091487 0.07848266
## 819 0.4 75 0.1091487 0.07848266
## 820 0.5 75 0.1091487 0.07848266
## 821 0.6 75 0.1091487 0.07848266
## 822 0.7 75 0.1091487 0.07848266
## 823 0.8 75 0.1091487 0.07848266
## 824 0.9 75 0.1091487 0.07848266
## 825 1.0 75 0.1091487 0.07848266
## 826 0.0 76 0.1091487 0.07848266
## 827 0.1 76 0.1091487 0.07848266
## 828 0.2 76 0.1091487 0.07848266
## 829 0.3 76 0.1091487 0.07848266
## 830 0.4 76 0.1091487 0.07848266
## 831 0.5 76 0.1091487 0.07848266
## 832 0.6 76 0.1091487 0.07848266
## 833 0.7 76 0.1091487 0.07848266
## 834 0.8 76 0.1091487 0.07848266
## 835 0.9 76 0.1091487 0.07848266
## 836 1.0 76 0.1091487 0.07848266
## 837 0.0 77 0.1091487 0.07848266
## 838 0.1 77 0.1091487 0.07848266
## 839 0.2 77 0.1091487 0.07848266
## 840 0.3 77 0.1091487 0.07848266
## 841 0.4 77 0.1091487 0.07848266
## 842 0.5 77 0.1091487 0.07848266
## 843 0.6 77 0.1091487 0.07848266
## 844 0.7 77 0.1091487 0.07848266
## 845 0.8 77 0.1091487 0.07848266
## 846 0.9 77 0.1091487 0.07848266
## 847 1.0 77 0.1091487 0.07848266
## 848 0.0 78 0.1091487 0.07848266
## 849 0.1 78 0.1091487 0.07848266
## 850 0.2 78 0.1091487 0.07848266
## 851 0.3 78 0.1091487 0.07848266
## 852 0.4 78 0.1091487 0.07848266
## 853 0.5 78 0.1091487 0.07848266
## 854 0.6 78 0.1091487 0.07848266
## 855 0.7 78 0.1091487 0.07848266
## 856 0.8 78 0.1091487 0.07848266
## 857 0.9 78 0.1091487 0.07848266
## 858 1.0 78 0.1091487 0.07848266
## 859 0.0 79 0.1091487 0.07848266
## 860 0.1 79 0.1091487 0.07848266
## 861 0.2 79 0.1091487 0.07848266
## 862 0.3 79 0.1091487 0.07848266
## 863 0.4 79 0.1091487 0.07848266
## 864 0.5 79 0.1091487 0.07848266
## 865 0.6 79 0.1091487 0.07848266
## 866 0.7 79 0.1091487 0.07848266
## 867 0.8 79 0.1091487 0.07848266
## 868 0.9 79 0.1091487 0.07848266
## 869 1.0 79 0.1091487 0.07848266
## 870 0.0 80 0.1091487 0.07848266
## 871 0.1 80 0.1091487 0.07848266
## 872 0.2 80 0.1091487 0.07848266
## 873 0.3 80 0.1091487 0.07848266
## 874 0.4 80 0.1091487 0.07848266
## 875 0.5 80 0.1091487 0.07848266
## 876 0.6 80 0.1091487 0.07848266
## 877 0.7 80 0.1091487 0.07848266
## 878 0.8 80 0.1091487 0.07848266
## 879 0.9 80 0.1091487 0.07848266
## 880 1.0 80 0.1091487 0.07848266
## 881 0.0 81 0.1091487 0.07848266
## 882 0.1 81 0.1091487 0.07848266
## 883 0.2 81 0.1091487 0.07848266
## 884 0.3 81 0.1091487 0.07848266
## 885 0.4 81 0.1091487 0.07848266
## 886 0.5 81 0.1091487 0.07848266
## 887 0.6 81 0.1091487 0.07848266
## 888 0.7 81 0.1091487 0.07848266
## 889 0.8 81 0.1091487 0.07848266
## 890 0.9 81 0.1091487 0.07848266
## 891 1.0 81 0.1091487 0.07848266
## 892 0.0 82 0.1091487 0.07848266
## 893 0.1 82 0.1091487 0.07848266
## 894 0.2 82 0.1091487 0.07848266
## 895 0.3 82 0.1091487 0.07848266
## 896 0.4 82 0.1091487 0.07848266
## 897 0.5 82 0.1091487 0.07848266
## 898 0.6 82 0.1091487 0.07848266
## 899 0.7 82 0.1091487 0.07848266
## 900 0.8 82 0.1091487 0.07848266
## 901 0.9 82 0.1091487 0.07848266
## 902 1.0 82 0.1091487 0.07848266
## 903 0.0 83 0.1091487 0.07848266
## 904 0.1 83 0.1091487 0.07848266
## 905 0.2 83 0.1091487 0.07848266
## 906 0.3 83 0.1091487 0.07848266
## 907 0.4 83 0.1091487 0.07848266
## 908 0.5 83 0.1091487 0.07848266
## 909 0.6 83 0.1091487 0.07848266
## 910 0.7 83 0.1091487 0.07848266
## 911 0.8 83 0.1091487 0.07848266
## 912 0.9 83 0.1091487 0.07848266
## 913 1.0 83 0.1091487 0.07848266
## 914 0.0 84 0.1091487 0.07848266
## 915 0.1 84 0.1091487 0.07848266
## 916 0.2 84 0.1091487 0.07848266
## 917 0.3 84 0.1091487 0.07848266
## 918 0.4 84 0.1091487 0.07848266
## 919 0.5 84 0.1091487 0.07848266
## 920 0.6 84 0.1091487 0.07848266
## 921 0.7 84 0.1091487 0.07848266
## 922 0.8 84 0.1091487 0.07848266
## 923 0.9 84 0.1091487 0.07848266
## 924 1.0 84 0.1091487 0.07848266
## 925 0.0 85 0.1091487 0.07848266
## 926 0.1 85 0.1091487 0.07848266
## 927 0.2 85 0.1091487 0.07848266
## 928 0.3 85 0.1091487 0.07848266
## 929 0.4 85 0.1091487 0.07848266
## 930 0.5 85 0.1091487 0.07848266
## 931 0.6 85 0.1091487 0.07848266
## 932 0.7 85 0.1091487 0.07848266
## 933 0.8 85 0.1091487 0.07848266
## 934 0.9 85 0.1091487 0.07848266
## 935 1.0 85 0.1091487 0.07848266
## 936 0.0 86 0.1091487 0.07848266
## 937 0.1 86 0.1091487 0.07848266
## 938 0.2 86 0.1091487 0.07848266
## 939 0.3 86 0.1091487 0.07848266
## 940 0.4 86 0.1091487 0.07848266
## 941 0.5 86 0.1091487 0.07848266
## 942 0.6 86 0.1091487 0.07848266
## 943 0.7 86 0.1091487 0.07848266
## 944 0.8 86 0.1091487 0.07848266
## 945 0.9 86 0.1091487 0.07848266
## 946 1.0 86 0.1091487 0.07848266
## 947 0.0 87 0.1091487 0.07848266
## 948 0.1 87 0.1091487 0.07848266
## 949 0.2 87 0.1091487 0.07848266
## 950 0.3 87 0.1091487 0.07848266
## 951 0.4 87 0.1091487 0.07848266
## 952 0.5 87 0.1091487 0.07848266
## 953 0.6 87 0.1091487 0.07848266
## 954 0.7 87 0.1091487 0.07848266
## 955 0.8 87 0.1091487 0.07848266
## 956 0.9 87 0.1091487 0.07848266
## 957 1.0 87 0.1091487 0.07848266
## 958 0.0 88 0.1091487 0.07848266
## 959 0.1 88 0.1091487 0.07848266
## 960 0.2 88 0.1091487 0.07848266
## 961 0.3 88 0.1091487 0.07848266
## 962 0.4 88 0.1091487 0.07848266
## 963 0.5 88 0.1091487 0.07848266
## 964 0.6 88 0.1091487 0.07848266
## 965 0.7 88 0.1091487 0.07848266
## 966 0.8 88 0.1091487 0.07848266
## 967 0.9 88 0.1091487 0.07848266
## 968 1.0 88 0.1091487 0.07848266
## 969 0.0 89 0.1091487 0.07848266
## 970 0.1 89 0.1091487 0.07848266
## 971 0.2 89 0.1091487 0.07848266
## 972 0.3 89 0.1091487 0.07848266
## 973 0.4 89 0.1091487 0.07848266
## 974 0.5 89 0.1091487 0.07848266
## 975 0.6 89 0.1091487 0.07848266
## 976 0.7 89 0.1091487 0.07848266
## 977 0.8 89 0.1091487 0.07848266
## 978 0.9 89 0.1091487 0.07848266
## 979 1.0 89 0.1091487 0.07848266
## 980 0.0 90 0.1091487 0.07848266
## 981 0.1 90 0.1091487 0.07848266
## 982 0.2 90 0.1091487 0.07848266
## 983 0.3 90 0.1091487 0.07848266
## 984 0.4 90 0.1091487 0.07848266
## 985 0.5 90 0.1091487 0.07848266
## 986 0.6 90 0.1091487 0.07848266
## 987 0.7 90 0.1091487 0.07848266
## 988 0.8 90 0.1091487 0.07848266
## 989 0.9 90 0.1091487 0.07848266
## 990 1.0 90 0.1091487 0.07848266
## 991 0.0 91 0.1091487 0.07848266
## 992 0.1 91 0.1091487 0.07848266
## 993 0.2 91 0.1091487 0.07848266
## 994 0.3 91 0.1091487 0.07848266
## 995 0.4 91 0.1091487 0.07848266
## 996 0.5 91 0.1091487 0.07848266
## 997 0.6 91 0.1091487 0.07848266
## 998 0.7 91 0.1091487 0.07848266
## 999 0.8 91 0.1091487 0.07848266
## 1000 0.9 91 0.1091487 0.07848266
## 1001 1.0 91 0.1091487 0.07848266
## 1002 0.0 92 0.1091487 0.07848266
## 1003 0.1 92 0.1091487 0.07848266
## 1004 0.2 92 0.1091487 0.07848266
## 1005 0.3 92 0.1091487 0.07848266
## 1006 0.4 92 0.1091487 0.07848266
## 1007 0.5 92 0.1091487 0.07848266
## 1008 0.6 92 0.1091487 0.07848266
## 1009 0.7 92 0.1091487 0.07848266
## 1010 0.8 92 0.1091487 0.07848266
## 1011 0.9 92 0.1091487 0.07848266
## 1012 1.0 92 0.1091487 0.07848266
## 1013 0.0 93 0.1091487 0.07848266
## 1014 0.1 93 0.1091487 0.07848266
## 1015 0.2 93 0.1091487 0.07848266
## 1016 0.3 93 0.1091487 0.07848266
## 1017 0.4 93 0.1091487 0.07848266
## 1018 0.5 93 0.1091487 0.07848266
## 1019 0.6 93 0.1091487 0.07848266
## 1020 0.7 93 0.1091487 0.07848266
## 1021 0.8 93 0.1091487 0.07848266
## 1022 0.9 93 0.1091487 0.07848266
## 1023 1.0 93 0.1091487 0.07848266
## 1024 0.0 94 0.1091487 0.07848266
## 1025 0.1 94 0.1091487 0.07848266
## 1026 0.2 94 0.1091487 0.07848266
## 1027 0.3 94 0.1091487 0.07848266
## 1028 0.4 94 0.1091487 0.07848266
## 1029 0.5 94 0.1091487 0.07848266
## 1030 0.6 94 0.1091487 0.07848266
## 1031 0.7 94 0.1091487 0.07848266
## 1032 0.8 94 0.1091487 0.07848266
## 1033 0.9 94 0.1091487 0.07848266
## 1034 1.0 94 0.1091487 0.07848266
## 1035 0.0 95 0.1091487 0.07848266
## 1036 0.1 95 0.1091487 0.07848266
## 1037 0.2 95 0.1091487 0.07848266
## 1038 0.3 95 0.1091487 0.07848266
## 1039 0.4 95 0.1091487 0.07848266
## 1040 0.5 95 0.1091487 0.07848266
## 1041 0.6 95 0.1091487 0.07848266
## 1042 0.7 95 0.1091487 0.07848266
## 1043 0.8 95 0.1091487 0.07848266
## 1044 0.9 95 0.1091487 0.07848266
## 1045 1.0 95 0.1091487 0.07848266
## 1046 0.0 96 0.1091487 0.07848266
## 1047 0.1 96 0.1091487 0.07848266
## 1048 0.2 96 0.1091487 0.07848266
## 1049 0.3 96 0.1091487 0.07848266
## 1050 0.4 96 0.1091487 0.07848266
## 1051 0.5 96 0.1091487 0.07848266
## 1052 0.6 96 0.1091487 0.07848266
## 1053 0.7 96 0.1091487 0.07848266
## 1054 0.8 96 0.1091487 0.07848266
## 1055 0.9 96 0.1091487 0.07848266
## 1056 1.0 96 0.1091487 0.07848266
## 1057 0.0 97 0.1091487 0.07848266
## 1058 0.1 97 0.1091487 0.07848266
## 1059 0.2 97 0.1091487 0.07848266
## 1060 0.3 97 0.1091487 0.07848266
## 1061 0.4 97 0.1091487 0.07848266
## 1062 0.5 97 0.1091487 0.07848266
## 1063 0.6 97 0.1091487 0.07848266
## 1064 0.7 97 0.1091487 0.07848266
## 1065 0.8 97 0.1091487 0.07848266
## 1066 0.9 97 0.1091487 0.07848266
## 1067 1.0 97 0.1091487 0.07848266
## 1068 0.0 98 0.1091487 0.07848266
## 1069 0.1 98 0.1091487 0.07848266
## 1070 0.2 98 0.1091487 0.07848266
## 1071 0.3 98 0.1091487 0.07848266
## 1072 0.4 98 0.1091487 0.07848266
## 1073 0.5 98 0.1091487 0.07848266
## 1074 0.6 98 0.1091487 0.07848266
## 1075 0.7 98 0.1091487 0.07848266
## 1076 0.8 98 0.1091487 0.07848266
## 1077 0.9 98 0.1091487 0.07848266
## 1078 1.0 98 0.1091487 0.07848266
## 1079 0.0 99 0.1091487 0.07848266
## 1080 0.1 99 0.1091487 0.07848266
## 1081 0.2 99 0.1091487 0.07848266
## 1082 0.3 99 0.1091487 0.07848266
## 1083 0.4 99 0.1091487 0.07848266
## 1084 0.5 99 0.1091487 0.07848266
## 1085 0.6 99 0.1091487 0.07848266
## 1086 0.7 99 0.1091487 0.07848266
## 1087 0.8 99 0.1091487 0.07848266
## 1088 0.9 99 0.1091487 0.07848266
## 1089 1.0 99 0.1091487 0.07848266
## 1090 0.0 100 0.1091487 0.07848266
## 1091 0.1 100 0.1091487 0.07848266
## 1092 0.2 100 0.1091487 0.07848266
## 1093 0.3 100 0.1091487 0.07848266
## 1094 0.4 100 0.1091487 0.07848266
## 1095 0.5 100 0.1091487 0.07848266
## 1096 0.6 100 0.1091487 0.07848266
## 1097 0.7 100 0.1091487 0.07848266
## 1098 0.8 100 0.1091487 0.07848266
## 1099 0.9 100 0.1091487 0.07848266
## 1100 1.0 100 0.1091487 0.07848266
The RMSE for the best model is 0.27, which is much lower than 0.43, RMSE of earlier fitted SVR model. We have successfully tuned the SVR model.
The next step is to represent the tuned SVR model. The value of parameters W and b the tuned model is -5.3 and -0.11 respectively. The R code to calculate parameters is as follows:
#Find value of W
W = t(Bstmodelsvm$coefs) %*% Bstmodelsvm$SV
#Find value of b
b = Bstmodelsvm$rho
print(b)
## [1] -0.1116744
A comparison of RMSE for the constructed SVR models, SVR and tuned SVR helps us to select the best model. Let us now visualize both these models in a single plot to enhance our understanding.
plot(prediction, pch = 16)
points(prediction$X, PredsvmY, col = "blue", pch =3)
points(prediction$X, PredYBst, col = "red", pch= 4)
points(prediction$X, PredsvmY, col = "blue", pch =3, type="l")
points(prediction$X, PredYBst, col = "red", pch=4, type="l")
SVR is a useful and flexible technique, helping the user to deal with the limitations pertaining to distributional properties of underlying variables, geometry of the data and the common problem of model overfitting. The choice of kernel function is critical for SVR modeling. We recommend beginners to use linear and RBF kernel for linear and non-linear relationship respectively.
We observe that SVR is superior to SLR as a prediction method. SLR cannot capture the nonlinearity in a dataset and SVR becomes handy in such situations.
We also compute Root Mean Square Error (RMSE) for both SLR and SVR models to evaluate performance of the models.
Further, we explain the idea of tuning SVR model. Tuning of SVR model can be performed as the technique provides flexibility with respect to maximum error and penalty cost. Tuning the model is extremely important as it optimizes the parameters for best prediction. In the end we compare the performance of SLR, SVR and tuned SVR model. As expected, the tuned SVR model provides the best prediction.
Bayowa