wpeterman / ResistanceGA

Optimize resistance surfaces using Genetic Algorithms
37 stars 15 forks source link

Doubts about "all_comb" #42

Closed martinsc93v closed 8 months ago

martinsc93v commented 10 months ago

Good evening, my name is Martin, I am an Argentinian researcher and first of all I would like to thank you very much for creating this wonderful tool.

I have been using ResistanceGA for a few months now, and I have encountered a major limitation in terms of the time it takes to run the analysis when the maximum iterations are not limited. I know this is to be expected and depends on computational capabilities. I am currently running an analysis of 6 categorical resistance surfaces using the "all_comb" function, to get the final bootstrap analysis as well.

The last analysis without limiting iterations took me more than 3 weeks, so I wanted to ask if there is a reliable way to determine how many iterations are enough to be able to limit it and reduce the time consumption.

If this is not recommended, I wanted to ask if it is possible to perform the analysis in parts. I know I can limit the maximum number of surfaces to be analysed and do it in steps, but that way I wouldn't get the final bootstrap (Or so I believe).

Thank you very much.

wpeterman commented 10 months ago

When you say "6 categorical resistance surfaces" do you mean you have 6 binary surfaces each representing a landcover class, or six different categorical surfaces each with >=2 categories?

I cannot give definitive guidance, but a few suggestions:

It is possible to run the bootstrap analysis on your own after the fact with whatever surfaces you choose (Resist.boot). Let me know if you have trouble configuring your data for this function to work.

martinsc93v commented 10 months ago

Thank you very much Bill for your quick reply. I do indeed have 6 binary surfaces each representing a land cover class. I will try limiting the iterations to 100 and see how long it takes. Regarding the "Resist.boot" function, I would be interested in being able to use it if I do the analysis separately.

This is my code:

GA.inputs <- GA.prep(ASCII.dir = r_new, 
                     resultados.dir = "todos.comb",
                     select.trans = NULL,
                     método = "LL",
                     paralelo = 16)

gdist.inputs <- gdist.prep(n.Pops = length(sp),
                           muestras = sp,
                           respuesta = total_respuesta,
                           método = 'commuteDistance')

all_comb <- all_comb(gdist.inputs = gdist.inputs,
                    results.dir = "D:/Paisaje/Area de trabajo/Proyecto Total/otra prueba"
                    ,GA.inputs = GA.inputs,
                    max.combinación = 6)

In order to perform this analysis in a stepwise way and to make better use of the analysis time, I was thinking of using "max.combination = 2" one day, "max.combination = 3-5" another day, and "max.combination = 6-6" another day. That way I would have three outputs, this can then be used to use the Resist.boot?. I don't quite understand what input Resist.boot requires.

I hope I have made myself understood correctly.

I don't quite understand what input Resist.boot requires.

Thank you for all your dedication

wpeterman commented 10 months ago

You just need to manually pull everything together to run the function: