title: Computing importance measure using VIP package on a parsnip model
body: <p>I am trying to compute feature importance using vi_firm() on a logistic regression model made in parsnip. For regex, I will use the iris dataset and try to predict whether an observation is setosa or not.</p>
  <pre><code>iris1 &lt;- iris %&gt;%
    mutate(class  = case_when(Species == 'setosa' ~ 'setosa',
                              TRUE ~ 'other'))
  iris1$class = as.factor(iris1$class)
  
  #set up logistic regression model
  iris.lr = logistic_reg(
    mode=&quot;classification&quot;,
    penalty=NULL,
    mixture=NULL
  ) %&gt;%
    set_engine(&quot;glmnet&quot;)
  
  iris.fit = iris.lr %&gt;%
    fit(class ~. , data = iris1)
  
  library(vip)
  vip::vi_firm(iris.fit, feature_names = features, train = iris1, type = 'classification')
  </code></pre>
  <p>This gives</p>
  <blockquote>
  <p>Error: Did you mean to use <code>new_data</code> instead of <code>newdata</code>?</p>
  </blockquote>
  <p>I am also trying to produce partial dependence plots using partial from the related pdp package. I get the same error.</p>