-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[SPARK-10259] [ML] Add @since annotation to ml.classification #8534
Conversation
@taishi-oss these were already in spark prior to 1.6, please see the parent JIRA for how to track down the correct version number to use in the |
Sorry for being late. |
@@ -35,6 +35,8 @@ import org.apache.spark.sql.DataFrame | |||
* for classification. | |||
* It supports both binary and multiclass labels, as well as both continuous and categorical | |||
* features. | |||
* | |||
* @since 1.4.0 | |||
*/ | |||
@Experimental | |||
final class DecisionTreeClassifier(override val uid: String) |
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.
Please also annotate override constructor fields, see ml.KMeans
I only pointed out some issues in the first few files, do you mind fixing them in all the files? |
I'm sorry for taking your time. |
@taishi-oss no worries, thank you for your help! reviewing now |
Not all methods in a file were introduced in the same version (e.g. see my comment about DecisionTreeClassifer.copy). Can you make sure that the annotation versions are correct? the jira has directions on how to identify the version a particular method was introduced. |
Sorry, I misunderstood. If it is not my mistake, DecisionTreeClassifer.copy was introduced in 1.4.1. |
I believe the you should add annotations to all public methods and constructor parameters (i.e. to |
I think that commit is right.
Which should I believe? |
Hmm I actually don't know the answer to that, maybe @mengxr can help |
@mengxr Could you take a look? Now, I'm adding Since annotation to ml.classification. Which version should I add Since annotation to this method? |
I think DecisionTreeClassifer.copy is introduced in v1.5.0. I compare "git show" commnad's results with "git blames"'s results in ml.classification, and then there are some differnces as desribed above. |
@Hiross thank you for your contribution. Could you update this PR? After that, I could review it. |
Jenkins, test this please. |
Sorry for being late. |
override val rootNode: Node, | ||
override val numFeatures: Int, | ||
override val numClasses: Int) | ||
@Since("1.5.0")override val uid: String, |
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.
since 1.4.0
@taishi-oss thanks for rebaseing master. Could you add |
ping @taishi-oss |
@yu-iskw Sorry for being late, I'm do right now. |
extends ProbabilisticClassifier[Vector, LogisticRegression, LogisticRegressionModel] | ||
with LogisticRegressionParams with DefaultParamsWritable with Logging { | ||
|
||
@Since("1.4.0") |
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.
1.2.0?
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.
"git show" says it was introduced in v.1.4.0.
hiro [spark] (master) > git show v1.2.0:mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala | grep "def this"
hiro [spark] (master) > git show v1.3.0:mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala | grep "def this"
hiro [spark] (master) > git show v1.4.0:mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala | grep "def this"
def this() = this(Identifiable.randomUID("logreg"))
I've left some comments, otherwise it's LGTM but It's good if @jkbradley or @mengxr can take a look at. |
Jenkins, test this please. |
Test build #47152 has finished for PR 8534 at commit
|
Test build #47153 has finished for PR 8534 at commit
|
Thank you for reviewing. |
@sarutak thank you for your help! |
Test build #47196 has finished for PR 8534 at commit
|
Test build #47260 has finished for PR 8534 at commit
|
Merged into master and branch-1.6. Thanks! |
Add since annotation to ml.classification Author: Takahashi Hiroshi <[email protected]> Closes #8534 from taishi-oss/issue10259. (cherry picked from commit 7d05a62) Signed-off-by: Xiangrui Meng <[email protected]>
Thank you for merging! |
Add @SInCE annotation to ml.classification