Biogeoinformatics
Biogeoinformatics
  • 3
  • 53 271
Sensing Technologies
The Guest lecture I gave at the Delft University in the Netherlands about an overview of Sensing Technologies with a focus on Geomatic and spatial science. After a short introduction about the sensing/sensor technologies, I discussed the key/main components of the field and future trends.
Переглядів: 350

Відео

sdm: a reproducible and extensible R package for species distribution modelling
Переглядів 24 тис.4 роки тому
This is a lecture, followed by a practical session, about species distribution modelling and the sdm R package that has been developed by Babak Naimi and Miguel Araujo. This material was part of the ENM2020 online course that was organised by Town Peterson, and therefore, the video is available in the ENM2020 course channel as well (ua-cam.com/video/TAbXwEEV56I/v-deo.html). The same video, howe...
sdm R package: species distribution modelling
Переглядів 29 тис.5 років тому
I recorded this video from my screen while I was explaining the solutions for an assignment I prepared for MSc students in the course global ecology and biodiversity at the University of Amsterdam. The assignment was about using the sdm package in R for modelling the geographical distribution of a species (Linx pardinus) in the current and future time given climate data. You can find the PDF fi...

КОМЕНТАРІ

  • @IrlanKehutanan
    @IrlanKehutanan 2 місяці тому

    Thank you Sir but if I run df <- data.frame(species=df$species,coordinates(d)) make error Error: unable to find an inherited method for function ‘coordinates’ for signature ‘obj = "sdmdata"’.

  • @alexkiser4017
    @alexkiser4017 4 місяці тому

    I'm having issues with spatrasters working in the ensemble function. The example code in the help section also runs into the same error. Any ideas on how to fix this? p2 <- ensemble(m, newdata=preds, filename='ens2.img',setting=list(method='weighted', stat='TSS',opt=2)) Error in .canProcessInMemory(.out[[1]], max(nlyr(.out), nlyr(newdata)) * : no slot of name "cpp" for this object of class "SpatRaster"

  • @SundayAdebunmiADENIRAN
    @SundayAdebunmiADENIRAN 5 місяців тому

    Really love this thank you

  • @felipeespinoza8647
    @felipeespinoza8647 6 місяців тому

    Hi! I'm having a repetitive error related to the 'newdata' part in the prediction. I followed every step in the tutorial, but it gives me: d <- sdmData(species~., spg, predictors = bioc, bg = list(method='gRandom', n=1000)) m <- sdm(species~., data = d, methods = c('brt','maxent','rf'), replication=c('sub','boot'), test.p=30, n=3) p3 <- predict(m, bioc) Error in .local(object, ...) : predict the number of values returned by the predict does not match the number of cells in newdata! I have also transformed the data manually but it doesn't seem to work, I checked the dimensions of the RasterStack and it is the same as the rest of the objects.

    • @biogeoinformatics
      @biogeoinformatics 6 місяців тому

      It was a problem in the predict function that has been fixed in the new version. Install the latest version of the sdm package!

    • @felipeespinoza8647
      @felipeespinoza8647 6 місяців тому

      @@biogeoinformatics Thank you, it solved the problem of the matching number of cells, but now when I run the models (m), Maxent models don't work but the rest of the algorithms work, can you give me an insight on that?

    • @biogeoinformatics
      @biogeoinformatics 6 місяців тому

      @@felipeespinoza8647 Maxent requires rJava in R and Java on your machine (OS). You need to first install JDK on your machine (not within R; on your operating system), then it should work. You may need to restart R. You can download JDK from here: www.oracle.com/java/technologies/downloads/

    • @felipeespinoza8647
      @felipeespinoza8647 6 місяців тому

      I did that already, and it as working, but after installing the latest version I get this error: > m2 <- sdm(species~., data = d, methods = 'maxent', replication='sub', + test.p=30, n=3) > m2 class : sdmModels ======================================================== number of species : 1 number of modelling methods : 1 names of modelling methods : maxent replicate.methods (data partitioning) : subsampling number of replicates (each method) : 3 toral number of replicates per model : 3 (per species) test percentage (in subsampling) : 30 ------------------------------------------ model run success percentage (per species) : ------------------------------------------ method species ---------------------- maxent : 0 % ################################################################### Error in if (wtest == "test.dep") cat("model Mean performance (per species), using test dataset (generated using partitioning): ") else if (wtest == : missing value where TRUE/FALSE needed

  • @sppervideeos4
    @sppervideeos4 9 місяців тому

    By entering the density of occurrence of the species at certain points, I want to predict the density at which they can be seen at other points. Is this possible? Can you suggest any method?

  • @julkaditapause1774
    @julkaditapause1774 9 місяців тому

    Can’t we used the uncropped predictors in prediction?

  • @julkaditapause1774
    @julkaditapause1774 9 місяців тому

    Thank you sir for making this useful video. I face error while trying to (raster)extractspg and bioc together

  • @Bikgya
    @Bikgya 9 місяців тому

    Great!! Video could you please make a video on the Biomod2 package?

  • @yifenghu3808
    @yifenghu3808 10 місяців тому

    Thank you so much for your great video!

  • @Igy-kn3tx
    @Igy-kn3tx Рік тому

    Can an r3PG model be included in an sdm model in R?

  • @yongjingwenyang
    @yongjingwenyang Рік тому

    Thank you for the great tutorial. Have one question, how to calculate the threshold maximizing the TSS/the maximum training sensitivity plus specificity threshold?

  • @sanadragab7555
    @sanadragab7555 Рік тому

    I want sdm code quickly pls

  • @sciencepakistan4250
    @sciencepakistan4250 Рік тому

    Kindly add a new video as we have now CMIP 6 data.

  • @upheaveworker2108
    @upheaveworker2108 Рік тому

    thanks for Sharing, really appreciate for newbie like me

  • @qZoneful
    @qZoneful Рік тому

    Great video!, I have a question, how can i do a fine tuning and parameter selection for models such as glm, gam, rf and maxent?

  • @inbard8122
    @inbard8122 Рік тому

    Hi, great video! Question - is there anyway to deal with spatial auto correllation (the presence of systematic spatial variation in a variable) with this package? Thank you

  • @samitkafle2433
    @samitkafle2433 Рік тому

    How can we get evaluation for ensemble one TSS and ROC vakue ?

  • @dakshsingh57
    @dakshsingh57 Рік тому

    Hi Everyone, did anyone tried running this -- m <- sdm(species~., d, methods=c('Maxent'), replication=c('sub'), test.p=40,n=1, parallelSetting=list(ncore=4,method='parallel')) - I am unable to run maxent as my R crashes when using MAXENT, can anyone suggest me what can we be done ?

    • @biogeoinformatics
      @biogeoinformatics Рік тому

      In your code, there is no sense in using parallel as you only have one method and one replication, though I don't think it is the reason for crashing. It could be related to the Java run time, rJava, or even lack of memory. The first step is to see if it works appropriately in a non-parallelised code

    • @dakshsingh57
      @dakshsingh57 Рік тому

      @@biogeoinformatics Thank you for your response - I tried the code without parallel and just kept maxent it crashed as well. The R studio crashes without any error message (only when maxent is added in the code) for other methods the code works well. At last I ran the script in R (not studio) the code worked. Surprisingly the same thing is not working in studio. I was able to run the script in R 4.2.2. Thank you for this efficient code !

  • @nisaayob5857
    @nisaayob5857 Рік тому

    May someone please help. Does anyone know how to get the rcurve for the ensemble model?

  • @eeeLab-kk2il
    @eeeLab-kk2il Рік тому

    p<-predict(m,biom,filename='pm21W5decPM.grd') Error in m[i] <- .self$whichMethod(m[i]) : replacement has length zero > What can i do sir

  • @danielhagos235
    @danielhagos235 Рік тому

    Great tutorial ever

  • @abkiyodida3551
    @abkiyodida3551 Рік тому

    Dear Dr. Babak Naimi, Thank you for your very teachable tutorial. please could you get me the scripts you are using on this live tutorial? Thank you.

  • @MayaRagesh
    @MayaRagesh Рік тому

    SIR i need help. Kindly share your suggestion Iam using R 4.1.3 SDM was running properly but now predict function not working. An error appearing p1 <- predict(m, newdata=biom, filename='prs.img') Error in .updateGDAL(object, v, cell, band, setminmax) : no longer supported Sir what can i do

    • @babaknaimi
      @babaknaimi Рік тому

      I am updating the package but meanwhile, you may use a raster format with extension of .grd, so use: p1 <- predict(m, newdata=biom, filename='pr.grd')

    • @ghaznainiqbal
      @ghaznainiqbal Рік тому

      @@babaknaimi I Tried .grd extension but it shows( Error in o[[id[j]]] : subscript out of bounds). Any Solution :)

    • @josemiguelvilalopez909
      @josemiguelvilalopez909 Рік тому

      @@babaknaimi hi! I have the same problem. Is there any update yet, or any planned date? Thank you very much!

  • @VishalKumar-nn2ch
    @VishalKumar-nn2ch Рік тому

    hello sir, this was very helpful for me. The prolem is I am not getting all the ML methods in getmethodNames() like svm,cart,rf. Please help me to add them into mine.

    • @babaknaimi
      @babaknaimi Рік тому

      Use installAll() to install all the required packages

  • @gabrielaspriestersbach6541

    Hello :) I have downloaded occurrence data manually from gbif and stored it in my directory as a .cvs file. I already read the records into r and started cleaning the data. I removed duplicated records and the records without coordinates. Now I wanted to keep only the records that are over the extent of my study area, which is part of south america. Any inputs on how do I do that? Nothing I tryed worked out...

  • @MayaRagesh
    @MayaRagesh Рік тому

    I am using the {sdm} package to do the species distribution modelling of invasive species. The {vifcor} was done succesfully and the variables(rasters) with high correlation were excluded. I am unable to compile my rasters(bioclim variables, elevation , ndvi) , occurance data into the {sdmData} object. Below is my code and error. d<-sdmData(formula=occurrence~., train=sp, predictors=biom1) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘sdmData’ for signature ‘"formula", "data.frame", "missing", "RasterStack"’ > sp <- as(sp, 'Spatial') Error in as(sp, "Spatial") : no method or default for coercing “data.frame” to “Spatial” please help me to solve this sir

    • @babaknaimi
      @babaknaimi Рік тому

      Convert your species data to a SpatialPointsDataFrame

    • @MayaRagesh
      @MayaRagesh Рік тому

      @@babaknaimi class(sp) [1] "data.frame" Sir can you please tell me the code used for it

    • @MayaRagesh
      @MayaRagesh Рік тому

      @@babaknaimi I have converted species data to spatial data frame sir > class(spwc) [1] "sf" "data.frame" > spwc Simple feature collection with 32 features and 1 field Geometry type: POINT Dimension: XY Bounding box: xmin: 76.64554 ymin: 10.49855 xmax: 76.74306 ymax: 11.0425 CRS: NA. But even now I am facing issue sir > d <- sdmData(species∼., spwc, predictors=biom) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘sdmData’ for signature ‘"formula", "sf", "missing", "RasterStack"’

    • @babaknaimi
      @babaknaimi Рік тому

      You need to convert it to SpatialPointsDataFrame (not sf) coordinates(sp) <- c("X", "Y") Replace X and Y with the names of coordinate columns

  • @nisaayob5857
    @nisaayob5857 2 роки тому

    Thank you for this video. May someone kindy assist, i am get this error trying to get slot "presence" from an object of a basic class ("NULL") with no slots in the modelling step

    • @babaknaimi
      @babaknaimi 2 роки тому

      My guess is that your input data (generated by sdmData) is presence-only. Put the setting in the bg argument in the sdmData to have background generated

    • @babaknaimi
      @babaknaimi 2 роки тому

      @UCqDtax1iPvWGBm-BGvraORA I would check the column names in points (make sure you would have one column contains presences as 1), also check d object to see if the name of species is the same as you used in formula in the sdm function

    • @nisaayob5857
      @nisaayob5857 2 роки тому

      @@babaknaimi Thank you so much, it works now. I truly appreciate it, sir.

  • @yuliialeshchenko6185
    @yuliialeshchenko6185 2 роки тому

    Hi! Does someone know why I have such an error after trying to use predict function? Error in .updateGDAL(object, v, cell, band, setminmax) : no longer supported

    • @babaknaimi
      @babaknaimi 2 роки тому

      It is because of the changes in GDAL library. I am fixing in the new version. Meanwhile, you may use the native raster format in the raster package, a file with extension of .grd

  • @AbidAli-wr6dz
    @AbidAli-wr6dz 2 роки тому

    Hi, I have a problem in coding as "sp" is my occurrence, vars are selected bioclimatic variables after the collinearity check. data <- sdmData(species~., train = sp, predictors = vars, + bg = list(n=1000)) ORR data <- sdmData(species~., sp, predictors = vars) In both cases, I'm having the error below. Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘sdmData’ for signature ‘"formula", "data.frame", "missing", "RasterStack"’ any advise are more than welcom! thans

    • @babaknaimi
      @babaknaimi 2 роки тому

      Convert sp to a SpatialPointsDataFrame

    • @AbidAli-wr6dz
      @AbidAli-wr6dz 2 роки тому

      Thanks, It's work now!

  • @lwalston4470
    @lwalston4470 2 роки тому

    Hi Babak - great video! I am struggling to get maxent to work with this sdm package. The maxent model completes training but when I apply predictions, I get the following error message: "Error in .local(object, ...) : Error in prediction....!" Any idea why that error is occurring?

  • @mayaammathilmanoharan1406
    @mayaammathilmanoharan1406 2 роки тому

    Hello sir, First of all thank you so much for uploading this tutorial. it was very helpful. Sir i have a doubt sir here we are using CMIP5 DATA instead for uploading CMIP6 future climate data what should we do .

  • @farisayidakwa7024
    @farisayidakwa7024 2 роки тому

    How do you incorporate other form of measurements outside presence/absence like abundance or any measurement like species density in this model?. Wondering if its the same or there are major changes to follow?

  • @Z-Animals
    @Z-Animals 2 роки тому

    please help me, how can i fix "Error: cannot allocate vector of size 12.0 Gb"

  • @mayamaya-lr1sy
    @mayamaya-lr1sy 2 роки тому

    SIR I HAVING THE ISSUE IN THE CROPING STEP spg <- crop(spg, e) where the error appears tobe like this Error in (function(classes, fdef, mtable): unable to find an inherited method for function crop for signature 'NULL' . Sir can you please help me with this

  • @DhaneeshB
    @DhaneeshB 2 роки тому

    Error in loadNamespace(x) : there is no package called ‘devtools’ ............ how can I install Babknaimi sdm to my r studio

  • @abdelmutalabazrag3136
    @abdelmutalabazrag3136 2 роки тому

    Thanks a lot for this tutorial. It really helped me to publish my first SDM using R, well appreciated. One question: Is there any code that I can use to split the response curve?. For example, instead of having 9 curves in one row, is it possible to have 3 rows (every 3 curves in one row). Thanks a lot.

  • @inyookim1617
    @inyookim1617 2 роки тому

    Thanks for the great tutorial. Have one question, how do I evaluate the ensemble model outcome(en)?, AUC, TSS and other stuffs.

    • @biogeoinformatics
      @biogeoinformatics 2 роки тому

      You can use the evaluates function, put the sdmdata object as the first argument, and the raster output of ensemble as the second argument

    • @inyookim1617
      @inyookim1617 2 роки тому

      @@biogeoinformatics thanks for the reply :) but have another question. I successfully ran the model, now looking through the outcomes and have one question. In the variable importance, is the metric based on the jackknife approach? and if not how are correlation test and auc test done?

  • @inyookim1617
    @inyookim1617 2 роки тому

    Thanks for the great tutorial. Have one question, how do I evaluate the ensemble model outcome(en)?, AUC, TSS and other stuffs.

  • @yerichoberhanu4331
    @yerichoberhanu4331 2 роки тому

    I am working to model species distribution using R with HP pc, Cori 7, 8th generation, RAM 8GB, processor 1.99 GB , while my PC does not give results. What is the minimum capacity of PC to run SDM?

    • @zainulabdin4466
      @zainulabdin4466 2 роки тому

      I got i5 9th gen and it works perfectly fine for me.

  • @saulopino8152
    @saulopino8152 2 роки тому

    thank you very much I was very lost in the part of quantifying the importance of bioclimatic variables and your video helped me a lot

  • @zuleymazarco7315
    @zuleymazarco7315 3 роки тому

    Anyone else having trouble using predict function for maxent algorithm?

    • @ghaznainiqbal
      @ghaznainiqbal Рік тому

      Me . Did you find any solution to that?

  • @shanshanchen1045
    @shanshanchen1045 3 роки тому

    thank you for sharing this video, I wonder whether raster::getData()function downloading the present data?

  • @emmadeeks3104
    @emmadeeks3104 3 роки тому

    brilliant tutorial! Apologies if I missed this, but do where can I find the code used in this tutorial? Thanks so much

    • @zainulabdin4466
      @zainulabdin4466 2 роки тому

      I practiced the code so I have it in .R file. Let me know if you need it.

    • @julkaditapause1774
      @julkaditapause1774 9 місяців тому

      @@zainulabdin4466bro i need it. It will be very helpful if you are able to provide me the code

  • @najlascheidegger5101
    @najlascheidegger5101 3 роки тому

    Hi! thank you so much for the great video!^^ Is that possible to create a background points radius (buffer) around the presence data?

  • @joseportillo217
    @joseportillo217 3 роки тому

    And the Maxent? How we can implement Maxent in sdm package?

  • @yadavghimirey
    @yadavghimirey 3 роки тому

    thank you very much for this.. a little confusion with the gui(m) code though.. Which package needs to be installed for this code to work? I got lost at that point..

    • @yadavghimirey
      @yadavghimirey 3 роки тому

      Actually I got the code to run but it keeps running for eternity and I have to abort r in order to stop it.. so there's a little problem.. not sure what makes it behave this way..

    • @biogeoinformatics
      @biogeoinformatics 3 роки тому

      You can simply run installAll() which installs all required packages including those required by gui (gui requires shiny).

    • @wyclifeoluoch9376
      @wyclifeoluoch9376 3 роки тому

      @@yadavghimirey I also think you are returning to console before closing the open shiny gui. You need to close the shiny gui first then come back to R console to continue with other codes.

    • @yadavghimirey
      @yadavghimirey 3 роки тому

      @@biogeoinformatics Thank you very much

    • @yadavghimirey
      @yadavghimirey 3 роки тому

      @@wyclifeoluoch9376 Thx! :)

  • @franciscoborges1590
    @franciscoborges1590 3 роки тому

    Hello! I've been trying to figure out if you can plot the randomly generated background pseudo-absences from the sdmData object, but have yet to find or figure it out. Can someone help me, if it is indeed possible? Would be cool to see how the function is generating the new data. Thanks in advance.

    • @wyclifeoluoch9376
      @wyclifeoluoch9376 3 роки тому

      Once you have the output of sdmData object, say d, you can convert it to data.frame object, extract species and coordinates columns, and filter where species == 0. df <- as.data.frame(d) df_spec_coord <- data.frame(species = df$species, coordinates(d)) df_pseudo_absences <- df_spec_coord %>% dplyr::filter(species == 0) plot(coords.x1 ~ coords.x2, data = df_pseudo_absences) Then you'll have the coordinates of generated pseudo_absences which you can put to plotting function of your choice.

  • @hyacinthewouyou9305
    @hyacinthewouyou9305 3 роки тому

    Thanks for sharing. Wonderful

  • @purityrima1366
    @purityrima1366 3 роки тому

    Thank you Babak. very helpful video here. Exactly what I was looking for!

  • @rahulg1504
    @rahulg1504 3 роки тому

    Thanks a lot for such a wonderful package. I have few questions, would be great if you can guide me a little. 1. How to create a null model (Raes & ter Steeges, 2007) and then use it to compare with the actual generated model (which is generated using sdm package)? 2. I would like to generate MaxEnt model, but there are few setting which I need to specifically use while generating the model through sdm r package. These settings are generated through ENMeval R package. How do we use those settings (arguments) while using sdm r package, can you please give an example, arguments like jackknife, regularisation multiplier etc.. I am relatively new in R. <appendix: maxent parameters github.com/shandongfx/workshop_maxent_R/blob/master/code/Appendix3_maxentParameters_v2.pdf> 3. Is SDM supports background similarity test like ENMtools? I would like to use the functionality for comparing two models.