@@ -332,9 +332,9 @@ private synchronized float[][] predict(DMatrix data,
332
332
*/
333
333
public float [][] inplace_predict (float [] data ,
334
334
int num_rows ,
335
- int num_features ,
336
- DMatrix d_matrix ) throws XGBoostError {
337
- return this . inplace_predict ( data , num_rows , num_features , d_matrix ,
335
+ int num_features ) throws XGBoostError {
336
+ return this . inplace_predict ( data , num_rows , num_features ,
337
+ Float . NaN , false , 0 , false , false );
338
338
Float .NaN , false , 0 , false , false );
339
339
}
340
340
@@ -356,9 +356,8 @@ public float[][] inplace_predict(float[] data,
356
356
public float [][] inplace_predict (float [] data ,
357
357
int num_rows ,
358
358
int num_features ,
359
- DMatrix d_matrix ,
360
359
float missing ) throws XGBoostError {
361
- return this .inplace_predict (data , num_rows , num_features , d_matrix ,
360
+ return this .inplace_predict (data , num_rows , num_features ,
362
361
missing , false , 0 , false , false );
363
362
}
364
363
@@ -383,10 +382,9 @@ public float[][] inplace_predict(float[] data,
383
382
public float [][] inplace_predict (float [] data ,
384
383
int num_rows ,
385
384
int num_features ,
386
- DMatrix d_matrix ,
387
385
float missing ,
388
386
boolean outputMargin ) throws XGBoostError {
389
- return this .inplace_predict (data , num_rows , num_features , d_matrix , missing ,
387
+ return this .inplace_predict (data , num_rows , num_features , missing ,
390
388
outputMargin , 0 , false , false );
391
389
}
392
390
@@ -411,11 +409,10 @@ public float[][] inplace_predict(float[] data,
411
409
public float [][] inplace_predict (float [] data ,
412
410
int num_rows ,
413
411
int num_features ,
414
- DMatrix d_matrix ,
415
412
float missing ,
416
413
boolean outputMargin ,
417
414
int treeLimit ) throws XGBoostError {
418
- return this .inplace_predict (data , num_rows , num_features , d_matrix , missing ,
415
+ return this .inplace_predict (data , num_rows , num_features , missing ,
419
416
outputMargin , treeLimit , false , false );
420
417
}
421
418
@@ -437,7 +434,6 @@ public float[][] inplace_predict(float[] data,
437
434
public float [][] inplace_predict (float [] data ,
438
435
int num_rows ,
439
436
int num_features ,
440
- DMatrix d_matrix ,
441
437
float missing ,
442
438
boolean outputMargin ,
443
439
int treeLimit ,
@@ -453,10 +449,10 @@ public float[][] inplace_predict(float[] data,
453
449
if (predContribs ) {
454
450
optionMask = 4 ;
455
451
}
456
-
452
+ DMatrix d_mat = new DMatrix ( data , num_rows , num_features , missing );
457
453
float [][] rawPredicts = new float [1 ][];
458
454
XGBoostJNI .checkCall (XGBoostJNI .XGBoosterInplacePredict (handle , data , num_rows , num_features ,
459
- d_matrix .getHandle (), missing ,
455
+ d_mat .getHandle (), missing ,
460
456
optionMask , treeLimit , rawPredicts )); // pass missing and treelimit here?
461
457
462
458
// System.out.println("Booster.inplace_predict rawPredicts[0].length = " +
0 commit comments