Dataset

fileURL <- "http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.data"
download.file(fileURL, destfile="breast-cancer-wisconsin.data", method="curl")

reading and displaying the structure of the data

df <- read.table("breast-cancer-wisconsin.data", na.strings = "?", sep=",")
str(df)
## 'data.frame':    699 obs. of  11 variables:
##  $ V1 : int  1000025 1002945 1015425 1016277 1017023 1017122 1018099 1018561 1033078 1033078 ...
##  $ V2 : int  5 5 3 6 4 8 1 2 2 4 ...
##  $ V3 : int  1 4 1 8 1 10 1 1 1 2 ...
##  $ V4 : int  1 4 1 8 1 10 1 2 1 1 ...
##  $ V5 : int  1 5 1 1 3 8 1 1 1 1 ...
##  $ V6 : int  2 7 2 3 2 7 2 2 2 2 ...
##  $ V7 : int  1 10 2 4 1 10 10 1 1 1 ...
##  $ V8 : int  3 3 3 3 3 9 3 3 1 2 ...
##  $ V9 : int  1 2 1 7 1 7 1 1 1 1 ...
##  $ V10: int  1 1 1 1 1 1 1 1 5 1 ...
##  $ V11: int  2 2 2 2 2 4 2 2 2 2 ...

The dataset has 699 0bservations and 11 variables. All variables are of integer data type.

At this point, you can name the columns. These names are displayed in the tree to facilitate semantic interpretation.

We first remove the column ID then rename the columns

df <- df [ ,-1]
names(df) <- c("ClumpThickness",
                 "UniformityCellSize",
                 "UniformityCellShape",
                 "MarginalAdhesion",
                 "SingleEpithelialCellSize",
                 "BareNuclei",
                 "BlandChromatin",
                 "NormalNucleoli",
                 "Mitoses",
                 "Class")

To view the new named variables and dropping the ID column

View(df)

Removing columns with missing Values

sum (is.na(df))
## [1] 16
colSums(sapply(df,is.na))
##           ClumpThickness       UniformityCellSize      UniformityCellShape 
##                        0                        0                        0 
##         MarginalAdhesion SingleEpithelialCellSize               BareNuclei 
##                        0                        0                       16 
##           BlandChromatin           NormalNucleoli                  Mitoses 
##                        0                        0                        0 
##                    Class 
##                        0
df$BareNuclei <- NULL

Variable v7 (BareNuclei) has 16 missing values. Thus, we eliminate it from the dataset.

Encoding the target feature (Last variable in the dataset)

df$Class <- factor(df$Class, levels=c(2,4), labels=c("1", "2"))

Splitting the dataset into the Training set and Test set

set.seed(123)
split = sample.split(df$Class, SplitRatio = 0.7)
training_set = subset(df, split == TRUE)
test_set = subset(df, split == FALSE)

The test_set has 210 observations and 10 variables.

Training_set has 489 observations and 10 variables.

Default SVM Model

svm_model <- svm(Class~., data = training_set)
summary(svm_model)
## 
## Call:
## svm(formula = Class ~ ., data = training_set)
## 
## 
## Parameters:
##    SVM-Type:  C-classification 
##  SVM-Kernel:  radial 
##        cost:  1 
## 
## Number of Support Vectors:  87
## 
##  ( 29 58 )
## 
## 
## Number of Classes:  2 
## 
## Levels: 
##  1 2

Confusion Matrix

pred = predict(svm_model, training_set)
pred
##   1   3   6   7   8  10  11  13  14  16  17  18  19  20  21  22  24  25  26  27 
##   1   1   2   1   1   1   1   1   1   2   1   1   2   1   2   2   2   1   1   1 
##  28  32  33  35  37  38  40  41  43  45  46  47  48  50  51  52  53  54  56  57 
##   1   1   2   1   2   1   2   2   2   2   1   2   1   2   2   1   2   2   2   2 
##  59  60  61  63  68  69  70  71  72  74  76  77  78  79  80  81  82  83  84  85 
##   2   2   2   2   2   2   1   1   2   2   1   1   1   1   1   1   1   1   1   2 
##  86  87  89  90  91  93  94  96  97  98  99 100 101 102 103 104 105 106 107 110 
##   2   2   1   1   1   1   1   1   1   1   2   2   2   1   1   2   2   2   2   2 
## 112 113 115 116 117 118 119 120 122 123 124 125 129 131 134 136 137 138 139 140 
##   2   2   1   1   1   2   1   1   1   2   2   2   2   1   1   1   1   1   1   1 
## 141 142 143 144 145 146 147 149 150 151 152 153 156 158 159 161 162 163 164 165 
##   1   1   2   1   1   1   2   2   2   1   2   2   2   1   1   2   1   1   1   1 
## 166 168 170 171 172 173 175 176 177 179 180 182 185 188 189 190 192 193 194 196 
##   1   2   1   1   1   1   2   2   1   1   2   1   2   2   2   1   2   1   1   1 
## 197 200 202 203 205 208 209 210 211 213 215 216 217 218 219 221 222 224 225 226 
##   2   1   2   1   1   1   1   1   2   1   2   2   1   1   2   1   2   2   2   1 
## 227 228 229 230 231 232 235 238 239 240 241 243 244 247 250 251 252 253 255 257 
##   2   2   1   2   2   2   1   2   2   2   1   1   1   2   1   1   2   2   2   1 
## 258 260 261 262 264 265 266 267 268 269 270 272 277 278 279 280 281 282 284 285 
##   1   2   2   2   2   2   1   2   2   2   1   1   1   1   1   2   1   1   2   2 
## 286 288 289 290 291 292 293 295 296 297 298 299 300 302 303 304 305 307 309 310 
##   2   1   2   2   1   1   2   1   2   2   1   1   2   1   2   1   2   1   2   1 
## 311 312 313 314 315 317 318 320 321 322 323 324 325 328 329 331 333 334 335 337 
##   1   1   2   1   1   2   2   2   2   1   1   2   1   1   2   2   1   2   2   2 
## 338 339 340 342 343 344 345 348 351 353 356 358 362 363 364 365 366 367 368 369 
##   1   1   2   1   1   1   2   1   1   2   1   2   2   1   1   1   1   2   2   1 
## 371 372 373 375 376 377 378 379 380 381 382 383 384 386 388 391 392 396 397 398 
##   1   1   1   1   1   1   1   1   1   1   2   1   1   1   1   1   2   1   1   1 
## 399 401 403 404 405 406 407 408 409 411 414 416 417 418 419 420 422 423 426 428 
##   1   2   1   1   1   1   1   1   1   1   1   1   2   1   1   1   2   1   2   2 
## 429 430 431 432 433 435 438 439 444 446 447 448 449 450 451 452 454 455 458 459 
##   1   1   1   1   1   2   1   1   1   1   1   1   1   2   1   1   2   1   2   1 
## 460 464 465 466 467 469 471 472 473 474 475 476 477 478 479 480 481 482 483 484 
##   1   1   1   2   2   1   1   1   1   1   1   1   1   1   1   2   1   1   2   2 
## 485 490 492 495 496 499 502 503 504 505 506 508 509 510 512 513 516 518 519 520 
##   1   1   2   1   1   1   1   1   1   1   1   1   1   1   1   1   2   1   1   2 
## 523 525 526 528 529 532 533 535 536 539 540 542 543 545 546 547 548 549 550 551 
##   2   1   1   1   1   1   1   1   1   1   1   1   1   1   1   2   1   1   2   1 
## 552 554 555 556 557 559 560 561 563 564 565 566 568 569 571 572 573 575 576 577 
##   1   1   1   1   1   1   1   1   1   1   1   2   1   2   2   2   1   2   1   1 
## 579 580 581 582 583 584 585 586 587 589 590 591 592 594 595 598 599 601 603 604 
##   1   1   1   2   2   1   1   1   2   2   1   2   2   1   2   1   1   1   1   2 
## 605 606 608 609 614 615 616 617 619 622 623 624 625 626 627 630 632 633 634 635 
##   2   2   1   2   1   1   1   1   1   2   1   1   1   1   2   1   1   1   2   1 
## 637 638 639 640 641 643 644 645 646 648 649 650 651 652 653 654 655 657 658 659 
##   2   1   1   1   1   1   1   1   1   1   2   1   1   1   1   1   1   1   2   2 
## 660 661 664 665 667 668 669 670 671 672 673 674 675 676 677 679 681 682 685 686 
##   1   1   1   1   1   1   2   2   2   1   1   1   1   1   1   1   2   2   1   1 
## 687 688 689 690 691 692 693 697 698 699 
##   1   1   1   1   1   2   1   2   2   2 
## Levels: 1 2
length(pred)
## [1] 490
length(training_set$Class)
## [1] 490
training_set$Class
##   [1] 1 1 2 1 1 1 1 2 1 2 1 1 2 1 2 2 2 1 2 1 1 1 2 1 2 1 2 1 2 2 1 2 1 2 2 2 2
##  [38] 2 2 2 2 2 2 2 2 2 1 1 2 2 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 1 1 2 2 2 2
##  [75] 1 2 2 2 2 2 2 2 1 1 1 2 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 2
## [112] 2 2 1 1 2 1 1 1 1 1 2 1 1 1 1 2 2 1 1 2 1 2 2 2 1 2 1 1 1 1 1 2 1 1 1 1 1
## [149] 2 1 2 2 1 1 2 1 2 2 2 1 2 2 1 2 2 2 1 2 2 2 1 1 1 2 1 1 2 1 2 1 1 1 2 2 2
## [186] 2 1 2 2 2 1 1 1 1 1 2 1 1 2 2 2 1 2 2 1 1 2 1 2 1 1 1 2 1 2 1 2 1 2 1 1 1
## [223] 2 1 1 2 2 1 2 1 1 2 1 1 2 2 1 2 2 2 1 1 2 1 1 1 2 1 1 1 1 2 2 1 1 1 1 2 2
## [260] 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1
## [297] 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 2 1 1 1 1 2 2 1 1 1 1 1 1 1 1
## [334] 1 1 2 1 1 2 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 2 1 1 1 1 1 1 1 1 1
## [371] 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2 2 1 2 1 1 1 1 1 2 2 1 1
## [408] 1 2 2 1 2 2 1 2 1 1 1 1 2 2 2 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1
## [445] 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 1 2 2 1 1 1
## [482] 1 1 1 1 2 1 2 2 2
## Levels: 1 2
cm = table(Predicted = pred, Actual = training_set$Class)
cm
##          Actual
## Predicted   1   2
##         1 310   5
##         2  11 164
accuracy = sum(diag(cm))/sum(cm)
accuracy
## [1] 0.9673469

Default SVM model gives 96.7%

SVM Linear model

svm_linear = svm (Class~., data = training_set, kernel = "linear")
summary (svm_linear)
## 
## Call:
## svm(formula = Class ~ ., data = training_set, kernel = "linear")
## 
## 
## Parameters:
##    SVM-Type:  C-classification 
##  SVM-Kernel:  linear 
##        cost:  1 
## 
## Number of Support Vectors:  45
## 
##  ( 21 24 )
## 
## 
## Number of Classes:  2 
## 
## Levels: 
##  1 2

Confusion Matrix

pred = predict (svm_linear, training_set)
pred
##   1   3   6   7   8  10  11  13  14  16  17  18  19  20  21  22  24  25  26  27 
##   1   1   2   1   1   1   1   1   1   2   1   1   2   1   2   2   2   1   1   1 
##  28  32  33  35  37  38  40  41  43  45  46  47  48  50  51  52  53  54  56  57 
##   1   1   2   1   2   1   2   2   2   2   1   2   1   2   2   1   2   2   2   2 
##  59  60  61  63  68  69  70  71  72  74  76  77  78  79  80  81  82  83  84  85 
##   1   2   2   2   2   2   1   1   2   2   1   1   1   1   1   1   1   1   1   2 
##  86  87  89  90  91  93  94  96  97  98  99 100 101 102 103 104 105 106 107 110 
##   2   2   1   1   1   1   1   1   1   1   2   2   2   1   1   2   2   2   2   2 
## 112 113 115 116 117 118 119 120 122 123 124 125 129 131 134 136 137 138 139 140 
##   2   2   1   1   1   2   1   1   1   2   2   2   2   1   1   1   1   1   1   1 
## 141 142 143 144 145 146 147 149 150 151 152 153 156 158 159 161 162 163 164 165 
##   1   1   2   1   1   1   2   1   2   1   2   2   2   1   1   2   1   1   1   1 
## 166 168 170 171 172 173 175 176 177 179 180 182 185 188 189 190 192 193 194 196 
##   1   2   1   1   1   1   2   2   1   1   1   1   2   2   2   1   2   1   1   1 
## 197 200 202 203 205 208 209 210 211 213 215 216 217 218 219 221 222 224 225 226 
##   2   1   2   1   1   1   1   1   2   1   2   2   1   1   2   1   2   2   2   1 
## 227 228 229 230 231 232 235 238 239 240 241 243 244 247 250 251 252 253 255 257 
##   2   2   1   2   2   2   1   2   2   2   1   1   1   2   1   1   2   2   2   1 
## 258 260 261 262 264 265 266 267 268 269 270 272 277 278 279 280 281 282 284 285 
##   1   2   2   2   2   2   1   2   2   2   1   1   1   1   1   2   1   1   2   2 
## 286 288 289 290 291 292 293 295 296 297 298 299 300 302 303 304 305 307 309 310 
##   2   1   2   2   1   1   2   1   2   2   1   1   2   1   2   1   2   1   2   1 
## 311 312 313 314 315 317 318 320 321 322 323 324 325 328 329 331 333 334 335 337 
##   1   1   2   1   1   2   2   2   2   1   1   2   1   1   2   2   1   2   2   2 
## 338 339 340 342 343 344 345 348 351 353 356 358 362 363 364 365 366 367 368 369 
##   1   1   2   1   1   1   2   1   1   2   1   2   2   1   1   1   1   2   2   1 
## 371 372 373 375 376 377 378 379 380 381 382 383 384 386 388 391 392 396 397 398 
##   1   1   1   1   1   1   1   1   1   1   2   1   1   1   1   1   2   1   1   1 
## 399 401 403 404 405 406 407 408 409 411 414 416 417 418 419 420 422 423 426 428 
##   1   2   1   1   1   1   1   1   1   1   1   1   2   1   1   1   2   1   2   2 
## 429 430 431 432 433 435 438 439 444 446 447 448 449 450 451 452 454 455 458 459 
##   1   1   1   1   1   2   1   1   1   1   1   1   1   2   1   1   2   1   2   1 
## 460 464 465 466 467 469 471 472 473 474 475 476 477 478 479 480 481 482 483 484 
##   1   1   1   2   2   1   1   1   1   1   1   1   1   1   1   2   1   1   2   2 
## 485 490 492 495 496 499 502 503 504 505 506 508 509 510 512 513 516 518 519 520 
##   1   1   2   1   1   1   1   1   1   1   1   1   1   1   1   1   2   1   1   2 
## 523 525 526 528 529 532 533 535 536 539 540 542 543 545 546 547 548 549 550 551 
##   2   1   1   1   1   1   1   1   1   1   1   1   1   1   1   2   1   1   2   1 
## 552 554 555 556 557 559 560 561 563 564 565 566 568 569 571 572 573 575 576 577 
##   1   1   1   1   1   1   1   1   1   1   1   2   1   2   2   2   1   2   1   1 
## 579 580 581 582 583 584 585 586 587 589 590 591 592 594 595 598 599 601 603 604 
##   1   1   1   2   2   1   1   1   2   2   1   2   2   1   2   1   1   1   1   2 
## 605 606 608 609 614 615 616 617 619 622 623 624 625 626 627 630 632 633 634 635 
##   2   2   1   2   1   1   1   1   1   2   1   1   1   1   2   1   1   1   2   1 
## 637 638 639 640 641 643 644 645 646 648 649 650 651 652 653 654 655 657 658 659 
##   2   1   1   1   1   1   1   1   1   1   2   1   1   1   1   1   1   1   2   2 
## 660 661 664 665 667 668 669 670 671 672 673 674 675 676 677 679 681 682 685 686 
##   1   1   1   1   1   1   2   2   2   1   1   1   1   1   1   1   2   2   1   1 
## 687 688 689 690 691 692 693 697 698 699 
##   1   1   1   1   1   2   1   2   2   2 
## Levels: 1 2
length(pred)
## [1] 490
length(training_set$Class)
## [1] 490
training_set$Class
##   [1] 1 1 2 1 1 1 1 2 1 2 1 1 2 1 2 2 2 1 2 1 1 1 2 1 2 1 2 1 2 2 1 2 1 2 2 2 2
##  [38] 2 2 2 2 2 2 2 2 2 1 1 2 2 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 1 1 2 2 2 2
##  [75] 1 2 2 2 2 2 2 2 1 1 1 2 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 2
## [112] 2 2 1 1 2 1 1 1 1 1 2 1 1 1 1 2 2 1 1 2 1 2 2 2 1 2 1 1 1 1 1 2 1 1 1 1 1
## [149] 2 1 2 2 1 1 2 1 2 2 2 1 2 2 1 2 2 2 1 2 2 2 1 1 1 2 1 1 2 1 2 1 1 1 2 2 2
## [186] 2 1 2 2 2 1 1 1 1 1 2 1 1 2 2 2 1 2 2 1 1 2 1 2 1 1 1 2 1 2 1 2 1 2 1 1 1
## [223] 2 1 1 2 2 1 2 1 1 2 1 1 2 2 1 2 2 2 1 1 2 1 1 1 2 1 1 1 1 2 2 1 1 1 1 2 2
## [260] 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1
## [297] 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 2 1 1 1 1 2 2 1 1 1 1 1 1 1 1
## [334] 1 1 2 1 1 2 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 2 1 1 1 1 1 1 1 1 1
## [371] 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2 2 1 2 1 1 1 1 1 2 2 1 1
## [408] 1 2 2 1 2 2 1 2 1 1 1 1 2 2 2 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 2 1 1 1
## [445] 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 2 1 1 1 1 1 1 1 2 2 1 1 1
## [482] 1 1 1 1 2 1 2 2 2
## Levels: 1 2
cm = table(Predicted = pred, Actual = training_set$Class)
cm
##          Actual
## Predicted   1   2
##         1 311   7
##         2  10 162
accuracy_linear = sum(diag(cm))/sum(cm)
accuracy_linear
## [1] 0.9653061

SVM linear model using linear Kernel gives 96.5%

SVM sigmoid model

svm_sigmoid = svm (Class~., data = training_set, kernel = "sigmoid")
summary (svm_sigmoid)
## 
## Call:
## svm(formula = Class ~ ., data = training_set, kernel = "sigmoid")
## 
## 
## Parameters:
##    SVM-Type:  C-classification 
##  SVM-Kernel:  sigmoid 
##        cost:  1 
##      coef.0:  0 
## 
## Number of Support Vectors:  34
## 
##  ( 17 17 )
## 
## 
## Number of Classes:  2 
## 
## Levels: 
##  1 2

Confusion Matrix

pred = predict (svm_sigmoid, training_set)
cm = table(Predicted = pred, Actual = training_set$Class)
cm
##          Actual
## Predicted   1   2
##         1 307   9
##         2  14 160
Accuracy_sigmoid = sum(diag(cm))/sum(cm)
Accuracy_sigmoid
## [1] 0.9530612

Sigmoid Kernel gives 95.3%

Model Tuning

set.seed(123)

tune function tunes the hyperparameters of teh model using grid search method

tuned_model = tune(svm, Class~., data=training_set,
     ranges = list(epsilon = seq (0, 1, 0.1), cost = 2^(0:2)))
plot (tuned_model)

summary (tuned_model)
## 
## Parameter tuning of 'svm':
## 
## - sampling method: 10-fold cross validation 
## 
## - best parameters:
##  epsilon cost
##        0    1
## 
## - best performance: 0.03877551 
## 
## - Detailed performance results:
##    epsilon cost      error dispersion
## 1      0.0    1 0.03877551 0.02029447
## 2      0.1    1 0.03877551 0.02029447
## 3      0.2    1 0.03877551 0.02029447
## 4      0.3    1 0.03877551 0.02029447
## 5      0.4    1 0.03877551 0.02029447
## 6      0.5    1 0.03877551 0.02029447
## 7      0.6    1 0.03877551 0.02029447
## 8      0.7    1 0.03877551 0.02029447
## 9      0.8    1 0.03877551 0.02029447
## 10     0.9    1 0.03877551 0.02029447
## 11     1.0    1 0.03877551 0.02029447
## 12     0.0    2 0.04081633 0.02151209
## 13     0.1    2 0.04081633 0.02151209
## 14     0.2    2 0.04081633 0.02151209
## 15     0.3    2 0.04081633 0.02151209
## 16     0.4    2 0.04081633 0.02151209
## 17     0.5    2 0.04081633 0.02151209
## 18     0.6    2 0.04081633 0.02151209
## 19     0.7    2 0.04081633 0.02151209
## 20     0.8    2 0.04081633 0.02151209
## 21     0.9    2 0.04081633 0.02151209
## 22     1.0    2 0.04081633 0.02151209
## 23     0.0    4 0.04693878 0.01680148
## 24     0.1    4 0.04693878 0.01680148
## 25     0.2    4 0.04693878 0.01680148
## 26     0.3    4 0.04693878 0.01680148
## 27     0.4    4 0.04693878 0.01680148
## 28     0.5    4 0.04693878 0.01680148
## 29     0.6    4 0.04693878 0.01680148
## 30     0.7    4 0.04693878 0.01680148
## 31     0.8    4 0.04693878 0.01680148
## 32     0.9    4 0.04693878 0.01680148
## 33     1.0    4 0.04693878 0.01680148
opt_model = tuned_model$best.model
summary(opt_model)
## 
## Call:
## best.tune(method = svm, train.x = Class ~ ., data = training_set, 
##     ranges = list(epsilon = seq(0, 1, 0.1), cost = 2^(0:2)))
## 
## 
## Parameters:
##    SVM-Type:  C-classification 
##  SVM-Kernel:  radial 
##        cost:  1 
## 
## Number of Support Vectors:  87
## 
##  ( 29 58 )
## 
## 
## Number of Classes:  2 
## 
## Levels: 
##  1 2

Building the best model

svm_best <- svm (Class~., data = training_set, epsilon = 0, cost = 1)
summary(svm_best)
## 
## Call:
## svm(formula = Class ~ ., data = training_set, epsilon = 0, cost = 1)
## 
## 
## Parameters:
##    SVM-Type:  C-classification 
##  SVM-Kernel:  radial 
##        cost:  1 
## 
## Number of Support Vectors:  87
## 
##  ( 29 58 )
## 
## 
## Number of Classes:  2 
## 
## Levels: 
##  1 2
tuned_model = tune(svm, Class~., data=training_set,
                   ranges = list(gamma = seq (0, 0.2, 0.02), cost = 2^(0:2)), kernel = c("radial", "linear", "sigmoid"))
## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used

## Warning in if (kernel > 10) stop("wrong kernel specification!"): the condition
## has length > 1 and only the first element will be used
plot (tuned_model)

summary (tuned_model)
## 
## Parameter tuning of 'svm':
## 
## - sampling method: 10-fold cross validation 
## 
## - best parameters:
##  gamma cost
##   0.08    1
## 
## - best performance: 0.03469388 
## 
## - Detailed performance results:
##    gamma cost      error dispersion
## 1   0.00    1 0.34489796 0.07033500
## 2   0.02    1 0.03673469 0.02508720
## 3   0.04    1 0.03673469 0.02686860
## 4   0.06    1 0.03673469 0.02686860
## 5   0.08    1 0.03469388 0.02554420
## 6   0.10    1 0.03469388 0.02554420
## 7   0.12    1 0.03469388 0.02554420
## 8   0.14    1 0.03469388 0.02554420
## 9   0.16    1 0.03877551 0.02625886
## 10  0.18    1 0.03877551 0.02625886
## 11  0.20    1 0.03877551 0.02796572
## 12  0.00    2 0.34489796 0.07033500
## 13  0.02    2 0.03673469 0.02686860
## 14  0.04    2 0.03877551 0.02957424
## 15  0.06    2 0.03469388 0.02554420
## 16  0.08    2 0.03469388 0.02554420
## 17  0.10    2 0.03673469 0.02686860
## 18  0.12    2 0.04081633 0.02545345
## 19  0.14    2 0.04081633 0.02545345
## 20  0.16    2 0.04081633 0.02886150
## 21  0.18    2 0.04285714 0.02796572
## 22  0.20    2 0.04285714 0.02796572
## 23  0.00    4 0.34489796 0.07033500
## 24  0.02    4 0.03673469 0.03161619
## 25  0.04    4 0.03469388 0.02554420
## 26  0.06    4 0.03469388 0.02554420
## 27  0.08    4 0.03877551 0.02625886
## 28  0.10    4 0.04285714 0.02443304
## 29  0.12    4 0.04081633 0.02545345
## 30  0.14    4 0.04285714 0.02796572
## 31  0.16    4 0.04693878 0.02554420
## 32  0.18    4 0.04693878 0.02554420
## 33  0.20    4 0.04897959 0.02581451