Description Usage Arguments Details Value See Also Examples

View source: R/variable_importance.R

Get variable importances

1 | ```
get_variable_importance(models, remove_zeros = TRUE, top_n)
``` |

`models` |
model_list object |

`remove_zeros` |
Remove features with zero variable importance? Default is TRUE |

`top_n` |
Integer: How many variables to return? The top_n most important variables be returned. If missing (default), all variables are returned |

Some algorithms provide variable importance, others don't. The best-performing model that offers variable importance will be used.

Data frame of variables and their importance for predictive power

1 2 3 | ```
m <- machine_learn(mtcars, outcome = mpg, models = "rf", tune = FALSE)
(vi <- get_variable_importance(m))
plot(vi)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.