Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix a bug in copy() of LogisticRegression that does not infer the penalty cuml parameter #807
Fix a bug in copy() of LogisticRegression that does not infer the penalty cuml parameter #807
Changes from all commits
5f92db6
82423db
c70135b
9dba6fe
47122f7
d014104
dbb7bac
f2982ce
fd608f1
fefdd47
ec3abda
f7377e7
32e8123
8668b39
d4cdf33
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Are these converted to Params to enable modification on copy? For spark.mllib estimators I think ok to do that only for mapped params. Or at least is a separate topic.
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.
Yeah, this is to avoid changing function signature: def copy(self: P, extra: Optional["ParamMap"] = None) -> P, and ParamMap = Dict[pyspark.ml.param.Param, Any].
copy() only accepts Param type.
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.
Sorry if I'm missing something - how come we need to declare RF cuml params as Params here and not in other algos?
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.
Yes, the Spark copy() function is designed to work with parameters of the Param type.
Declaring the cuML parameters for RandomForest as Param enables copy() to function correctly for them. For other algorithms, their parameters should have already been declared as Param type (e.g. eps, min_samples of DBSCAN).
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.
What about, say,
whiten
orsvd_solver
in PCA? Those are undeclared and seems like adding those to the PCA test would cause an attribute failure.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.
Right. We will need to declare the cuml-only params (e.g.
whiten
andsvd_solver
) one by one as Param, in order to get them working properly.