Add public group getter for java and scala (#4838)

* Add public group getter for java and scala

* Remove unnecessary param from javadoc

* Fix typo

* Fix another typo

* Add semicolon

* Fix javadoc return statement

* Fix missing return statement

* Add a unit test
This commit is contained in:
Stephanie Yang
2019-09-09 13:07:48 -04:00
committed by Philip Hyunsu Cho
parent f90e7f9aa8
commit 0fc7dcfe6c
3 changed files with 47 additions and 0 deletions

View File

@@ -149,6 +149,14 @@ class DMatrix private[scala](private[scala] val jDMatrix: JDMatrix) {
jDMatrix.setGroup(group)
}
/**
* Get group sizes of DMatrix (used for ranking)
*/
@throws(classOf[XGBoostError])
def getGroup(): Array[Int] = {
jDMatrix.getGroup()
}
/**
* get label values
*