revise current API

This commit is contained in:
CodingCat
2016-03-07 21:48:16 -05:00
parent 9911771b02
commit fa03aaeb63
9 changed files with 170 additions and 64 deletions

View File

@@ -129,6 +129,7 @@ public class RabitTracker {
public boolean start() {
if (startTrackerProcess()) {
logger.debug("Tracker started, with env=" + envs.toString());
System.out.println("Tracker started, with env=" + envs.toString());
// also start a tracker logger
Thread logger_thread = new Thread(new TrackerProcessLogger());
logger_thread.setDaemon(true);

View File

@@ -119,7 +119,7 @@ class Booster private[xgboost4j](booster: JBooster) extends Serializable {
*/
@throws(classOf[XGBoostError])
def predict(data: DMatrix, outPutMargin: Boolean = false, treeLimit: Int = 0)
: Array[Array[Float]] = {
: Array[Array[Float]] = {
booster.predict(data.jDMatrix, outPutMargin, treeLimit)
}
@@ -178,6 +178,10 @@ class Booster private[xgboost4j](booster: JBooster) extends Serializable {
booster.getFeatureScore(featureMap).asScala
}
def toByteArray: Array[Byte] = {
booster.toByteArray
}
/**
* Dispose the booster when it is no longer needed
*/