-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #12
Changes from all commits
93fec6e
0e984f5
3611083
777cc38
81af083
9a52a8c
3ed9044
fdc6fb5
3f0bfd5
2ef3949
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -54,18 +54,18 @@ predictTfBinding <- function(models, | |||||||||
| npDt, chunk, contextColName){ | ||||||||||
| data.table::setDTthreads(floor(numThreads/nWorker)) | ||||||||||
|
|
||||||||||
| allFeats <- listFeatures() | ||||||||||
| colsToRemove <- unlist(subset(allFeats, | ||||||||||
| !included_in_training)$feature_matrix_column_names) | ||||||||||
| colsToRemove <- c(colsToRemove, LABELCOLNAME, contextColName, CSCORECOLNAME) | ||||||||||
| if(name==MODELALLNAME){ | ||||||||||
| colsToRemove <- setdiff(colsToRemove, CSCORECOLNAME) | ||||||||||
| # get feature order, to ensure the same order of features | ||||||||||
| modText <- model$save_model_to_string() | ||||||||||
| featOrder <- unlist(tstrsplit(modText, split="\n", keep=8)) | ||||||||||
| if(!any(grepl("feature_names", featOrder))){ | ||||||||||
| stop("Feature names could not be retrieved from the provided model.") | ||||||||||
| } | ||||||||||
| featOrder <- unlist(tstrsplit(gsub("feature_names=","", featOrder), split=" ")) | ||||||||||
|
Comment on lines
58
to
63
|
||||||||||
| modText <- model$save_model_to_string() | |
| featOrder <- unlist(tstrsplit(modText, split="\n", keep=8)) | |
| featOrder <- unlist(tstrsplit(gsub("feature_names=","", featOrder), split=" ")) | |
| featOrder <- model$feature_name() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model$feature_name() does not seem to exist in the R-API of lightgbm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one could still check that the "feature_names=" is present in that row
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.