[R-sig-Geo] Get importance variables in dismo package
Tim Appelhans
tim.appelhans at gmail.com
Mon Oct 10 14:18:38 CEST 2016
There's also this:
https://cran.r-project.org/web/packages/MaxentVariableSelection/index.html
On 10.10.2016 14:15, Ben Tupper wrote:
> Hi,
>
> Along a similar vein, I have been assembling into a package some basic helper tools for working with dismo and in particular MaxEnt.
>
> https://github.com/BigelowLab/dismotools
>
>> library(devtools)
>> install_github("BigelowLab/dismotools")
>> library(dismotools)
>> maxent_get_results(me, "importance")
>> maxent_get_results(me, "contribution")
> Ben
>
>
>
>> On Oct 10, 2016, at 4:48 AM, Ahmadou Dicko <dicko.ahmadou at gmail.com> wrote:
>>
>> Hi Fabrice,
>>
>> If you want to access variable contribution from a MaxEnt model, you can
>> use still use the plot method.
>>
>> var_imp <- plot(me)
>> var_imp
>>
>> Or build you own function based on the code of the plot method
>>
>> var_contrib <- function(m, df = TRUE, ...) {
>> stopifnot(inherits(m, "MaxEnt"))
>> res <- m at results[grep("contribution", rownames(m at results)), ]
>> names(res) <- gsub(".contribution", "", names(res))
>> if (df)
>> res <- data.frame(var = names(res), contrib = unname(res))
>> res
>> }
>>
>> var_contrib(me)
>>
>> Hope it helps
>>
>>
>>
>>
>>
>> On Mon, Oct 10, 2016 at 10:15 AM, Fabrice Vinatier <
>> fabrice.vinatier.pro at gmail.com> wrote:
>>
>>> Dear list members (and especially Robert J. Hijmans),
>>>
>>> I am actually using the excellent "dismo" package for flora species
>>> distribution modelling, and I am wondering if there is a way to get
>>> importance of variables used in maxent, domain, mahal and bioclim
>>> functions, to handle these importances in a table.
>>>
>>> I tested all possible models included in https://cran.r-project.org/web
>>> /packages/dismo/vignettes/sdm.pdf and I get easily the importance of
>>> variables issued from Random Forest, GLM and RPART models using
>>> "$importance", "$coefficients[-1], and "$variable.importance",
>>> respectively, but it is more difficult to get the others, although there is
>>> a possible indirect access to the importance variable of Maxent model using
>>> plot(me) (if me is the fitted model).
>>>
>>> Best regards,
>>>
>>> Fabrice Vinatier
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>
>>
>> --
>> Ahmadou H. DICKO, PhD
>> Data hacker and climate change economist
>> Post-doctoral researcher
>> CIRAD - UMR15 CIRAD/INRA Control of exotic and emerging diseases
>> email : ahmadou-hamady.dicko at cirad.fr <ahmadou.dicko at ucad.edu.sn>
>> twitter : @dickoah
>> github : github/dickoa <https://github.com/dickoa>
>> portable: +33 7 68 16 11 58
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
> Ben Tupper
> Bigelow Laboratory for Ocean Sciences
> 60 Bigelow Drive, P.O. Box 380
> East Boothbay, Maine 04544
> http://www.bigelow.org
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
#####################################
Tim Appelhans
Department of Geography
Environmental Informatics
Philipps Universität Marburg
Deutschhausstraße 12
Raum 00A08
35032 Marburg (Paketpost: 35037 Marburg)
Germany
Tel +49 (0) 6421 28-25957
http://environmentalinformatics-marburg.de/
More information about the R-sig-Geo
mailing list