在R中使用超类进行分类
我想对几种土地覆盖物(4类)进行监督分类。 我打算使用R实现这一点,使用“RStoolbox”中的函数“superClass”,使用RandomForest方法 函数的语法如下所示:在R中使用超类进行分类,r,classification,spatial,raster,R,Classification,Spatial,Raster,我想对几种土地覆盖物(4类)进行监督分类。 我打算使用R实现这一点,使用“RStoolbox”中的函数“superClass”,使用RandomForest方法 函数的语法如下所示: superClass(img, trainData, valData = NULL, responseCol = NULL, nSamples = 1000, polygonBasedCV = FALSE, trainPartition = NULL, model = "rf", tuneLength =
superClass(img, trainData, valData = NULL, responseCol = NULL,
nSamples = 1000, polygonBasedCV = FALSE, trainPartition = NULL,
model = "rf", tuneLength = 3, kfold = 5, minDist = 2,
mode = "classification", predict = TRUE, predType = "raw",
filename = NULL, verbose, overwrite = TRUE, ...)
按照我编写脚本的方式,我没有使用所有可能的字符串:
class1 <- superClass(img = IR_extr, model = "rf", trainData = train, responseCol = "Macroform")
class1通过使用brick函数将光栅文件格式化为光栅砖文件,可以解决此问题。