[jvm-packages] Expose json dumps to scala (#2247)

* Add parameter passthru of format on Booster.getModelDump
This commit is contained in:
ebernhardson 2017-05-02 17:41:27 -07:00 committed by Nan Zhu
parent ccccf8a015
commit 197a9eacc5

View File

@ -166,9 +166,9 @@ class Booster private[xgboost4j](private var booster: JBooster)
* Controls whether the split statistics are output. * Controls whether the split statistics are output.
*/ */
@throws(classOf[XGBoostError]) @throws(classOf[XGBoostError])
def getModelDump(featureMap: String = null, withStats: Boolean = false) def getModelDump(featureMap: String = null, withStats: Boolean = false, format: String = "text")
: Array[String] = { : Array[String] = {
booster.getModelDump(featureMap, withStats) booster.getModelDump(featureMap, withStats, format)
} }
/** /**