0

I am plotting some partial dependences plots in R, for random forest. I am using pdp package and it is not reacting to any specification for my limits in z variable. code:

pd <- partial(RF, pred.var= c ( "SOC", "Q"))
plotPartial(pd, zlim=c(1000,3000))

i had also tried: zlim(c(1000,3000), and zmax and min and similars

arvi1000
  • 9,393
  • 2
  • 42
  • 52
  • You should try to post a complete example that reproduces your problem. It will be hard to help you with the question as-is, because people don't have the contents of the `RF` object – arvi1000 Sep 28 '20 at 16:37

1 Answers1

0

Thanks for your suggestion, here is my code

library(randomForest) #fitting RF
library(pdp) #partial dependence analysis
set.seed(100)
RF=randomForest(CorrYield~Year+SOC+pH+ Sorghum+Pbray + FertP+ FertN+ PP_veg +PP_PC, data= RF_sin1 , ntree=500, importance=T, proximity=T)
pd_SOC_P <- partial(RF, pred.var= c("SOC", "Pbray"))
plotPartial(pd_SOC_P,xlab="SOC(%)", ylab="PBray(mg kg^-1)")
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459