<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br></div><div><br></div><br><div><div>Le 20 janv. 2011 à 19:12, Sami Domisch a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear modellers, <br><br>I have a question related to the method, how BIOMOD creates the binary consensus predictions. I played a bit around with the test data which comes with the package, and modelled the present distribution of 2 species (Sp185, Sp191) with 3 algorithms (GLM, CTA, RF x 2 repetitions each, one pseudo-absence-run to keep it simple and fast..). I used the Projection-function using the same present-day variables in order to receive the present-day distribution for the whole study area. Subsequently I used the Ensemble.Forecasting-function to get a consensus model using weighted averages (prob.mean.weighted, weight decay 1.6). So far nothing special about it, I pasted the code below.<br><br>I now compared the binary consensus output BIOMOD created for the two species (i.e. prob.mean.weighted in "Total_consensus_present_Bin") with the probability-output (0-1000) of the consensus prob.mean.weighted-model, after applying the prob.mean.weighted - threshold which is given in the "consensus_present_results"-table (PA1, which used the total data of the two repetitions PA1_rep1 and PA1_rep2). I thus created the binary results manually.<br><br>Now here is my problem: the number of presence-pixels ("1") differ between the two outputs, although they should be identical. For instance, Sp185 and Sp191 have 736 and 1217 presence-pixels, respectively, whereas the manually calculated ones have 678 and 1149 pixels classified as "1". Shouldn't the numbers be the same? How is BIOMOD creating the binary results, did I miss something? I guess this derives from the partitioning of the train/test-data vs. using the total data? <br><br>I am interested in a solution since I want to average several projections for one species based on different climate scenarios, and binary maps would be essential for me. The idea was quite simple: to average the probabilities of the different climate-scenario runs for each grid cell, and then average the thresholds of these runs to get the binary outputs. And to check this method, I compared the BIOMOD-output and the manually calculated one. However there seems to be some kind of discrepancy...Has anybody a solution or maybe knows a work-around for this issue?<br>Any help is appreciated, many thanks in advance!<br>Sami<br><br><br>#############<br><br>load("Sp.Env.rda")<br><br>library(BIOMOD)<br><br>Initial.State(Response=Sp.Env[, c(17:18)], Explanatory = Sp.Env[,c(4:10)],<br> IndependentResponse = NULL, IndependentExplanatory = NULL)<br><br>Models( GLM = T, TypeGLM = "poly", Test = "AIC", <br> GBM = F, No.trees = 3000,<br> GAM = F, Spline = 3,<br> CTA = T, CV.tree = 50,<br> ANN = F, CV.ann = 2,<br> FDA = F,<br> SRE = F, quant=0.025,<br> MARS = F,<br> RF = T,<br> NbRunEval = 2, DataSplit = 70,<br> Yweights=NULL, Roc=TRUE, Optimized.Threshold.Roc=TRUE,<br> Kappa=TRUE, TSS=TRUE, KeepPredIndependent = FALSE, VarImport=5,<br> NbRepPA=1, strategy="random",<br> nb.absences=1000)<br><br><br>Projection(Proj = Sp.Env[,4:10],<br> Proj.name='present',<br> GLM = T,<br> GBM = F,<br> GAM = F,<br> CTA = T,<br> ANN = F,<br> FDA = F,<br> SRE = F, quant=0.025,<br> MARS = F,<br> RF = T,<br> BinRoc = T, BinKappa = F, BinTSS = F,<br> FiltRoc = F, FiltKappa = F, FiltTSS = F,<br> repetition.models=T)<br><br><br>Ensemble.Forecasting(Proj.name= "present",<br> weight.method='Roc',<br> PCA.median=F,<br> binary=T,<br> bin.method='Roc',<br> Test=T,<br> decay=1.6,<br> repetition.models=T)<br><br><br># check outputs:<br><br># binary output:<br>load("proj.present/Total_consensus_present_Bin")<br>binary_weighted_average <- Total_consensus_present_Bin[,,2]<br>write.csv( binary_weighted_average, "binary_weighted_average.csv")<br><br><br># probs 0-1000:<br>load("proj.present/Total_consensus_present")<br>probs_weighted_average <- Total_consensus_present[,,2]<br>write.csv(probs_weighted_average, "probs_weighted_average.csv")<br><br># get appropriate threshold for prob.mean.weighted:<br>consensus_present_results<br><br>#############<br><br>_______________________________________________<br>Biomod-commits mailing list<br><a href="mailto:Biomod-commits@lists.r-forge.r-project.org">Biomod-commits@lists.r-forge.r-project.org</a><br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits<br></div></blockquote></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>--------------------------</div><div>Dr. Wilfried Thuiller</div><div>Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><div>Université Joseph Fourier</div><div>BP53, 38041 Grenoble cedex 9, France</div><div>tel: +33 (0)4 76 51 44 97</div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email: <a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br>Home page: <a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Website: <a href="http://www-leca.ujf-grenoble.fr/equipes/tde.htm">http://www-leca.ujf-grenoble.fr/equipes/tde.htm</a><br><br>FP6 European MACIS project: <a href="http://www.macis-project.net/">http://www.macis-project.net</a><br>FP6 European EcoChange project: <a href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><div><br></div></span></div></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></body></html>