예제 #1
0
 /**
  * update with give grad and hess
  *
  * @param dtrain training data
  * @param grad first order of gradient
  * @param hess seconde order of gradient
  * @throws XGBoostError native error
  */
 public void boost(DMatrix dtrain, float[] grad, float[] hess) throws XGBoostError {
   if (grad.length != hess.length) {
     throw new AssertionError(
         String.format("grad/hess length mismatch %s / %s", grad.length, hess.length));
   }
   JNIErrorHandle.checkCall(
       XgboostJNI.XGBoosterBoostOneIter(handle, dtrain.getHandle(), grad, hess));
 }