adjust the API signature as well as the docs

This commit is contained in:
CodingCat
2016-03-11 15:22:44 -05:00
parent 97e4dcde98
commit 400b1faecc
23 changed files with 58 additions and 52 deletions

View File

@@ -94,7 +94,7 @@ public class BoosterImplTest {
int round = 5;
//train a boost model
return XGBoost.train(paramMap, trainMat, round, watches, null, null);
return XGBoost.train(trainMat, paramMap, round, watches, null, null);
}
@Test
@@ -177,6 +177,6 @@ public class BoosterImplTest {
//do 5-fold cross validation
int round = 2;
int nfold = 5;
String[] evalHist = XGBoost.crossValidation(param, trainMat, round, nfold, null, null, null);
String[] evalHist = XGBoost.crossValidation(trainMat, param, round, nfold, null, null, null);
}
}

View File

@@ -74,7 +74,7 @@ class ScalaBoosterImplSuite extends FunSuite {
val watches = List("train" -> trainMat, "test" -> testMat).toMap
val round = 2
XGBoost.train(paramMap, trainMat, round, watches, null, null)
XGBoost.train(trainMat, paramMap, round, watches, null, null)
}
test("basic operation of booster") {
@@ -126,6 +126,6 @@ class ScalaBoosterImplSuite extends FunSuite {
"objective" -> "binary:logistic", "gamma" -> "1.0", "eval_metric" -> "error").toMap
val round = 2
val nfold = 5
XGBoost.crossValidation(params, trainMat, round, nfold, null, null, null)
XGBoost.crossValidation(trainMat, params, round, nfold, null, null, null)
}
}