[RS-ecology] Help to perform mlc with superClass

Veronica Andreo veroandreo at gmail.com
Wed May 25 20:21:38 CEST 2016


Hello Sarah,

thanks much for your answer :)

> first it would be good to see how your code looks like, beause it makes it
> much easier to provide a solution.

Sure, here is the code and errors I get...
I must be missing some parameter or there's something wrong in the
data, but dunno what...
(layers_arg is a rasterbrick, spdf a spatialpointdataframe,
ol_pa_va.occ are the classes, only 2 -0 and 1-, given that they are
presence and absence data)

ml_sc <- superClass(img=layers_arg, trainData = spdf, responseCol =
"ol_pa_va.occ", model = "mlc", trainPartition=0.7)

Something is wrong; all the Accuracy metric values are missing:
    Accuracy       Kappa
 Min.   : NA   Min.   : NA
 1st Qu.: NA   1st Qu.: NA
 Median : NA   Median : NA
 Mean   :NaN   Mean   :NaN
 3rd Qu.: NA   3rd Qu.: NA
 Max.   : NA   Max.   : NA
 NA's   :1     NA's   :1
Error in train.default(x, y, weights = w, ...) : Stopping
In addition: Warning messages:
1: In log(det(cod)) : NaNs produced
2: In eval(expr, envir, enclos) :
  model fit failed for Fold1: parameter=none Error in solve.default(cod) :
  system is computationally singular: reciprocal condition number = 3.36789e-20

3: In eval(expr, envir, enclos) :
  model fit failed for Fold2: parameter=none Error in solve.default(cod) :
  system is computationally singular: reciprocal condition number = 1.10124e-20

4: In log(det(cod)) : NaNs produced
5: In eval(expr, envir, enclos) :
  model fit failed for Fold3: parameter=none Error in solve.default(cod) :
  system is computationally singular: reciprocal condition number = 5.85695e-20

6: In log(det(cod)) : NaNs produced
7: In eval(expr, envir, enclos) :
  model fit failed for Fold4: parameter=none Error in solve.default(cod) :
  system is computationally singular: reciprocal condition number = 4.74322e-20

8: In log(det(cod)) : NaNs produced
9: In eval(expr, envir, enclos) :
  model fit failed for Fold5: parameter=none Error in solve.default(cod) :
  system is computationally singular: reciprocal condition number = 2.25924e-20

10: In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :
  There were missing values in resampled performance measures.

> Giving an example will not help you,
> because then just check the help-function or the webpacke of the inside-R
> community (http://www.inside-r.org/node/354053), an example is already given
> there.

Yes, I checked there, of course, but the example is with random forest
algorithm. That one works, but I wanted to test maximum likelihood,
too

> As another hint I suggest the book "RS and GIS in Ecology" by Martin
> and Benjamin. My one is at home so I can't chech but I would guess that you
> will find an example plus explanation there.

I also have the book, and the examples and explanations are with
random forest. Great book, btw!

Thanks a lot!

Vero

> Gesendet: Freitag, 20. Mai 2016 um 16:00 Uhr
> Von: "Veronica Andreo" <veroandreo at gmail.com>
> An: rs-ecology at lists.uni-wuerzburg.de
> Betreff: [RS-ecology] Help to perform mlc with superClass
> Hello,
>
> I'm trying to perform a maximum likelihood classification by means of
> RStoolbox::superClass but I don't manage to make it work. For sure I'm
> missing to set something in the command but I don't know what, and I cannot
> find an example of it, either.
>
> Can someone provide an example of how to use it, please?
> Thanks a lot in advance!
>
> best,
> Vero
> _______________________________________________ RS-ecology mailing list
> RS-ecology at lists.uni-wuerzburg.de
> https://lists.uni-wuerzburg.de/mailman/listinfo/rs-ecology


More information about the RS-ecology mailing list