I need to perform image classification using SVM, but I'am getting problem with beginCluster() function with error message: 12 cores detected, using 11.
The code I used is as follows:
library(rgdal)
library(raster)
library(caret)
library(sf)
library(e1071)
library(snow)
stacked image import
img <- brick("Composite_LT05_L1TP_145039_19950318_20170109_01_T1_B1.tif")
#signature .shp files
trainData <- readOGR("C:/Users/Zainab Khan/Desktop/india", "trainData")
#ploting the image
plotRGB(img, 5,4,3 , stretch = "lin")
traing the data for supervised classification
model1 <- svm(img~., data = trainData, kernel = "linear")
testing data
beginCluster()
svm_class <- clusterR(img, raster::predict, args = list(model=model1))
endCluster()