add new parameters model to avoid the use of dump file for functions plot, dt.tree, importance

add new size parameter for plot function
This commit is contained in:
El Potaeto
2015-01-11 09:40:55 +01:00
parent c8c5789efd
commit 31a3b38ef8
5 changed files with 40 additions and 25 deletions

View File

@@ -64,9 +64,9 @@ xgb.importance <- function(feature_names = NULL, filename_dump = NULL, model = N
}
if(text[2] == "bias:"){
result <- linearDump(feature_names, text)
result <- readLines(filename_dump) %>% linearDump(feature_names, .)
} else {
result <- treeDump(feature_names, text)
result <- treeDump(feature_names, text = text)
}
result
}