Deprecate set group (#4864)

* Convert jvm package and R package.

* Restore for compatibility.
This commit is contained in:
Jiaming Yuan
2019-09-17 21:26:54 -04:00
committed by GitHub
parent 0e0955a6d8
commit d669ea1eaa
8 changed files with 16 additions and 44 deletions

View File

@@ -201,7 +201,7 @@ public class DMatrix {
* @throws XGBoostError native error
*/
public void setGroup(int[] group) throws XGBoostError {
XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetGroup(handle, group));
XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixSetUIntInfo(handle, "group", group));
}
/**

View File

@@ -1,10 +1,10 @@
/*
Copyright (c) 2014 by Contributors
Copyright (c) 2014 by Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@@ -75,8 +75,6 @@ class XGBoostJNI {
public final static native int XGDMatrixSetUIntInfo(long handle, String field, int[] array);
public final static native int XGDMatrixSetGroup(long handle, int[] group);
public final static native int XGDMatrixGetFloatInfo(long handle, String field, float[][] info);
public final static native int XGDMatrixGetUIntInfo(long handle, String filed, int[][] info);