From c3d8f21df339564e5b43bb5f42c41d12c46d8eec Mon Sep 17 00:00:00 2001 From: El Potaeto Date: Wed, 31 Dec 2014 00:52:53 +0100 Subject: [PATCH] change assignation sign --- R-package/demo/create_sparse_matrix.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R-package/demo/create_sparse_matrix.R b/R-package/demo/create_sparse_matrix.R index b697def97..a333f3ac0 100644 --- a/R-package/demo/create_sparse_matrix.R +++ b/R-package/demo/create_sparse_matrix.R @@ -60,6 +60,6 @@ bst <- xgboost(data = sparse_matrix, label = output_vector, max.depth = 3, xgb.dump(bst, 'xgb.model.dump', with.stats = T) # sparse_matrix@Dimnames[[2]] represents the column names of the sparse matrix. -importance = xgb.importance(sparse_matrix@Dimnames[[2]], 'xgb.model.dump') +importance <- xgb.importance(sparse_matrix@Dimnames[[2]], 'xgb.model.dump') print(importance) # According to the matrix below, the most important feature in this dataset to predict if the treatment will work is having received a Placebo or not.