Skip to content
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

[jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 #3532

Merged
merged 11 commits into from
Aug 7, 2018

Conversation

CodingCat
Copy link
Member

missing the test cases

@codecov-io
Copy link

codecov-io commented Jul 30, 2018

Codecov Report

Merging #3532 into master will increase coverage by 0.21%.
The diff coverage is 76.41%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3532      +/-   ##
============================================
+ Coverage     45.64%   45.86%   +0.21%     
  Complexity      188      188              
============================================
  Files           166      166              
  Lines         13234    13320      +86     
  Branches        445      468      +23     
============================================
+ Hits           6041     6109      +68     
- Misses         6989     6994       +5     
- Partials        204      217      +13
Impacted Files Coverage Δ Complexity Δ
...c/main/scala/ml/dmlc/xgboost4j/scala/Booster.scala 35.71% <50%> (ø) 8 <1> (ø) ⬇️
...c/xgboost4j/scala/spark/params/GeneralParams.scala 66.66% <66.66%> (ø) 0 <0> (ø) ⬇️
...c/xgboost4j/scala/spark/params/BoosterParams.scala 58.82% <75%> (+0.28%) 0 <0> (ø) ⬇️
...dmlc/xgboost4j/scala/spark/XGBoostClassifier.scala 66.53% <76.47%> (+2.62%) 18 <0> (ø) ⬇️
.../dmlc/xgboost4j/scala/spark/XGBoostRegressor.scala 65.68% <79.06%> (+3.41%) 16 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cf97b4...dc99d66. Read the comment docs.

@hcho3
Copy link
Collaborator

hcho3 commented Jul 31, 2018

@CodingCat Should we shoot for merging this PR before releasing 0.80? If we need to, we can delay 0.80 release a bit.

@CodingCat
Copy link
Member Author

@hcho3 , yeah this is a blocking issue for the next release,

too busy in daily jobs and also that tutorial thing, need more time (expectation is Friday) to add unit test cases here

@CodingCat CodingCat changed the title [WIP][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 [BlOCKING][WIP][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 Jul 31, 2018
@CodingCat CodingCat changed the title [BlOCKING][WIP][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 [BLOCKING][WIP][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 Jul 31, 2018
@CodingCat
Copy link
Member Author

@yanboliang would you please take a look?

@CodingCat CodingCat changed the title [BLOCKING][WIP][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 [BLOCKING][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 Aug 1, 2018
@hcho3 hcho3 mentioned this pull request Aug 1, 2018
6 tasks
Copy link
Contributor

@yanboliang yanboliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good overall, I left one minor comments.

predLeafItr: Iterator[Row],
predContribItr: Iterator[Row]): Iterator[Row] = {
// the following implementation is to be improved
if (isDefined(leafPredictionCol) && isDefined(contribPredictionCol)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a little concern that users may set leafPredictionCol with "", their intention should be not to output this column, but here we don't handle this case. At MLlib, we check $(leafPredictionCol).isEmpty as well. What do you think about it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, good point, let me revise it

@CodingCat
Copy link
Member Author

@yanboliang please check the latest update

@yanboliang
Copy link
Contributor

Looks good, it seams the failure is not relevant.

@CodingCat CodingCat changed the title [BLOCKING][jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 [jvm-packages] enable predictLeaf/predictContrib/treeLimit in 0.8 Aug 7, 2018
@hcho3
Copy link
Collaborator

hcho3 commented Aug 7, 2018

I fixed the error in the Jenkins build. It should build successfully now.

@CodingCat CodingCat merged commit 1c08b3b into dmlc:master Aug 7, 2018
@CodingCat CodingCat deleted the transform_leaf branch August 7, 2018 21:01
CodingCat added a commit that referenced this pull request Aug 7, 2018
)

* add back train method but mark as deprecated

* add back train method but mark as deprecated

* fix scalastyle error

* fix scalastyle error

* partial finish

* no test

* add test cases

* add test cases

* address comments

* add test for regressor

* fix typo
@CodingCat
Copy link
Member Author

@hcho3 I merged this and cherry-picked to release_0.80 branch

@hcho3
Copy link
Collaborator

hcho3 commented Aug 7, 2018

@CodingCat Okay, I will do a code freeze using this commit. The branch will be re-based against the master at this commit.

As for the doc building, I'm going to place the build script on the Jenkins CI server. This way, we can install Java, Scala, and Maven. The built Javadoc will be placed to an S3 bucket, which will be then downloaded by ReadTheDocs. Expect a commit by end of today.

@joyang1
Copy link

joyang1 commented Sep 28, 2018

Why Xgboost4j predictLeaf method is always have 3 leaves ?

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants