revise current API
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user