You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R-package/R/xgb.plot.importance.R
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#' Plot feature importance bar graph
2
2
#'
3
-
#' Read a data.table containing feature importance details and plot it.
3
+
#' Read a data.table containing feature importance details and plot it (for both GLM and Trees).
4
4
#'
5
5
#' @importFrom magrittr %>%
6
6
#' @param importance_matrix a \code{data.table} returned by the \code{xgb.importance} function.
@@ -10,7 +10,7 @@
10
10
#'
11
11
#' @details
12
12
#' The purpose of this function is to easily represent the importance of each feature of a model.
13
-
#' The function return a ggplot graph, therefore each of its characteristic can be overriden (to customize it).
13
+
#' The function returns a ggplot graph, therefore each of its characteristic can be overriden (to customize it).
14
14
#' In particular you may want to override the title of the graph. To do so, add \code{+ ggtitle("A GRAPH NAME")} next to the value returned by this function.
15
15
#'
16
16
#' @examples
@@ -40,21 +40,29 @@ xgb.plot.importance <-
40
40
stop("Ckmeans.1d.dp package is required for plotting the importance", call.=FALSE)
0 commit comments