Message-ID: <CAM_vju=EXqeFoOM4PTZ6k_L4RreL9gnM1Uaomtxko525=Tmr-g@mail.gmail.com>
Date: 2019-10-29T14:51:48Z
From: Sarah Goslee
Subject: Variable importance bar plot
In-Reply-To: <CAC4+n+wrH6kinnT+aTRH_+oOFKw6uy7R7Oey=mzESPHZ8e8XJg@mail.gmail.com>
It's not entirely clear to me how you expect the values to be
calculated, but you might look at partial dependence plots, for
example as implemented in the pdp package.
Sarah
On Sun, Oct 27, 2019 at 6:00 AM Enoch Gyamfi Ampadu <egampadu at gmail.com> wrote:
>
> Dear List,
>
> I hope this finds you well. Please I have done a Land cover classification
> using randomForest. I used selected satellite image bands as input
> variables. I have four thematic classes. I obtained the general variable
> importance using *varImpPlot (my model) . *Now I want to have bar chart
> plot showing each thematic class and the variable importance for each
> class. That is, how each band is ranked in predicting a thematic class. I
> tried using this function:
>
> *importance = varImp(my model, scale= TRUE)*
>
> *plot (importance. *
>
> However it did not work. I tried to put in *geom= "bar*". And I had error.
>
> Please I will be glad to get some assistance.
>
> Thank you.
>
> Best regards,
>
> Enoch
>
--
Sarah Goslee (she/her)
http://www.numberwright.com