-
Notifications
You must be signed in to change notification settings - Fork 11
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
Python, R: export_json bugfix, passing scale parameter to C++ #145
Conversation
R/R/forestry.R
Outdated
@@ -787,7 +787,7 @@ forestry <- function(x, | |||
|
|||
# Create vectors with the column means and SD's for scaling | |||
colMeans <- rep(0, ncol(x)+1) | |||
colSd <- rep(0, ncol(x)+1) | |||
colSd <- rep(1, ncol(x)+1) |
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.
Could we leave this change out of this PR?
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.
@edwardwliu Yes, but this is a fix related to R - colSd is 1 by default - same fix for Python is col_sd = np.repeat(1.0, ncol + 1)
, other code in this PR is about code style update + added test.
Do you want me to fix only Python part for now?
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.
Fixed by reverting colSd back to 0 init and passing scale bool parameter to C++ function
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.
LGTM
Python, R: col_sd = 1.0 by default (no scaling) as it is used in multiplying
export_json bugfix, RandomForest scale=False case