[refactor] move java package to namespace java

This commit is contained in:
tqchen
2016-03-05 09:53:46 -08:00
committed by CodingCat
parent ae969a0e69
commit e8560c7909
15 changed files with 199 additions and 195 deletions

View File

@@ -21,7 +21,6 @@ import _root_.scala.collection.JavaConverters._
import ml.dmlc.xgboost4j.java.{DMatrix => JDMatrix, DataBatch, XGBoostError}
class DMatrix private[scala](private[scala] val jDMatrix: JDMatrix) {
/**
* init DMatrix from file (svmlight format)
*

View File

@@ -16,10 +16,11 @@
package ml.dmlc.xgboost4j.scala
import ml.dmlc.xgboost4j.java
import ml.dmlc.xgboost4j.java.IObjective
import scala.collection.JavaConverters._
import ml.dmlc.xgboost4j.java.{DMatrix => JDMatrix}
import ml.dmlc.xgboost4j.java.IObjective
trait ObjectiveTrait extends IObjective {
/**
* user define objective function, return gradient and second order gradient
@@ -30,7 +31,7 @@ trait ObjectiveTrait extends IObjective {
*/
def getGradient(predicts: Array[Array[Float]], dtrain: DMatrix): List[Array[Float]]
private[scala] def getGradient(predicts: Array[Array[Float]], dtrain: java.DMatrix):
private[scala] def getGradient(predicts: Array[Array[Float]], dtrain: JDMatrix):
java.util.List[Array[Float]] = {
getGradient(predicts, new DMatrix(dtrain)).asJava
}

View File

@@ -16,6 +16,7 @@
package ml.dmlc.xgboost4j.scala
import ml.dmlc.xgboost4j.java.{XGBoost => JXGBoost}
import scala.collection.JavaConverters._
object XGBoost {