The different colors represent the different species. The support vectors are measure by the x’s in the pictures. As we can see the biggest hyperplane between the plant species is between the versicolor species and the setosa species.
The formula that was called and used for this was:
svm(formula = Species ~ ., data = iris)
The classification that was called was a C-classification. This also shows 51 support vectors. The 8 represents the first species, the 22 represents the second species, and the 21 represents the third species. These are all showing the very distince classes between each species.
##
## Call:
## svm(formula = Species ~ ., data = iris)
##
##
## Parameters:
## SVM-Type: C-classification
## SVM-Kernel: radial
## cost: 1
##
## Number of Support Vectors: 51
##
## ( 8 22 21 )
##
##
## Number of Classes: 3
##
## Levels:
## setosa versicolor virginica
The color coded data shown here represents three classes, setosa, versicolor, virginica. We can see that there is a margin maximum with a separating hyperplane between that margin. We can see at the very edge of the margin width there is the support Edge detection, which gives us the means to find the edges of a picture or the bounds of a picture. This technique will magnify points in data
## Parsed with column specification:
## cols(
## `5.1` = col_double(),
## `3.5` = col_double(),
## `1.4` = col_double(),
## `0.2` = col_double(),
## `Iris-setosa` = col_character()
## )
## 'data.frame': 150 obs. of 5 variables:
## $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
## $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
## $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
## $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
## $ Species : Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ...
Below shows an image of a dog loaded from the pet images file. The image has been plotted and blurred
## Min Median Mean Max Breed
## 1 0.45100 0.45880 0.46800 0.494100 Basset
## 2 0.96470 1.00000 0.98820 1.000000 Basset
## 3 0.25490 0.46670 0.43530 0.584300 Basset
## 4 0.71370 0.72940 0.73860 0.772500 Beagle
## 5 0.00784 0.01560 0.01300 0.015686 Beagle
## 6 0.99220 1.00000 0.99740 1.000000 Beagle
## 7 0.03137 0.03529 0.03922 0.050980 GoldenLab
## 8 0.18820 0.47840 0.38950 0.502000 GoldenLab
## 9 0.07451 0.26275 0.23399 0.364710 GoldenLab
## 10 0.82750 0.96080 0.92810 0.996100 GoldenLab
library(e1071)
library(ggplot2)
#print(Min)
qplot(Min, Mean, data=pixll_data2)
## Warning: package 'neuralnet' was built under R version 3.6.3
## Loading required package: lattice