gblinear xgboost in R -


let's data has both numeric & catagoricial feature, , i've created xgboost model using gblinear. i've analyzed xgboost model xgb.importance, how can express categorical variable weights?

while xgboost considered black box model, can understand feature importance (for both categorical , numeric) averaging gain of each feature split , trees.

this represented in graph below.

# feature real names names <- dimnames(trainmatrix)[[2]]  # compute feature importance matrix importance_matrix <- xgb.importance(names, model = bst)  # nice graph xgb.plot.importance(importance_matrix[1:10,]) 

enter image description here

in feature importance above, can see first 10 important features.

this function gives color each bar. k-means clustering applied group each feature importance.

alternately, represented in tree diagram (see link above).


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -