marlonecobos / kuenm

kuenm: An R package for detailed calibration and construction of Maxent Ecological Niche Models.
63 stars 24 forks source link

In "prepare_swd" Background sets are creating infinitely #34

Open dannyvelezv opened 3 years ago

dannyvelezv commented 3 years ago

Hi, running this script in R in linux and with 19 variables the creation of sets keep going until infinite. It creates the 969 sets with combination of 3 variables but after that keep going with combination of 4, 5 and so on. The script used:

occurrences <- read.csv("occ.csv") # species occurrence records

vars <- stack(list.files("Presente", pattern = ".asc$", # variables for full.names = TRUE)) # calibration area

preparing as needed for running

help(prepare_swd)

prepare_swd(occ = occurrences, species = "species", longitude = "longitude", latitude = "latitude", data.split.method = "random", train.proportion = 0.7, raster.layers = vars, sample.size = 10000, var.sets = "all_comb", min.number = 3, save = TRUE, name.occ = "occ", back.folder = "Background", set.seed = 1)

marlonecobos commented 3 years ago

Hi,

That is the expected behavior. If you see the function documentation it says it creates all combinations of min.number or more variables. If you use 19 variables you will get a lot. You may want to reduce the total number of variables based on multicollinearity or other criteria. You can also create a list of sets of variables you need, and use that instead of all_comb