[jvm-packages] Deprecate constructors with implicit missing value. (#7225)
This commit is contained in:
@@ -124,7 +124,11 @@ public class DMatrix {
|
||||
* @param nrow number of rows
|
||||
* @param ncol number of columns
|
||||
* @throws XGBoostError native error
|
||||
*
|
||||
* @deprecated Please specify the missing value explicitly using
|
||||
* {@link DMatrix(float[], int, int, float)}
|
||||
*/
|
||||
@Deprecated
|
||||
public DMatrix(float[] data, int nrow, int ncol) throws XGBoostError {
|
||||
long[] out = new long[1];
|
||||
XGBoostJNI.checkCall(XGBoostJNI.XGDMatrixCreateFromMat(data, nrow, ncol, 0.0f, out));
|
||||
|
||||
@@ -79,6 +79,7 @@ class DMatrix private[scala](private[scala] val jDMatrix: JDMatrix) {
|
||||
* @param nrow number of rows
|
||||
* @param ncol number of columns
|
||||
*/
|
||||
@deprecated("Please specify the missing value explicitly", "XGBoost 1.5")
|
||||
@throws(classOf[XGBoostError])
|
||||
def this(data: Array[Float], nrow: Int, ncol: Int) {
|
||||
this(new JDMatrix(data, nrow, ncol))
|
||||
|
||||
Reference in New Issue
Block a user