Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在R中使用超类进行分类_R_Classification_Spatial_Raster - Fatal编程技术网

在R中使用超类进行分类

在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 =

我想对几种土地覆盖物(4类)进行监督分类。 我打算使用R实现这一点,使用“RStoolbox”中的函数“superClass”,使用RandomForest方法

函数的语法如下所示:

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函数将光栅文件格式化为光栅砖文件,可以解决此问题。