minor fix
This commit is contained in:
parent
f73bcd427d
commit
e99ab0d1dd
@ -76,14 +76,16 @@ public final class Booster {
|
||||
* @throws org.dmlc.xgboost4j.util.XgboostError
|
||||
*/
|
||||
public Booster(Iterable<Entry<String, Object>> params, String modelPath) throws XgboostError {
|
||||
long[] out = new long[1];
|
||||
init(null);
|
||||
if(modelPath == null) {
|
||||
throw new NullPointerException("modelPath : null");
|
||||
}
|
||||
loadModel(modelPath);
|
||||
setParam("seed","0");
|
||||
setParams(params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void init(DMatrix[] dMatrixs) throws XgboostError {
|
||||
|
||||
@ -55,6 +55,9 @@ public class DMatrix {
|
||||
* @throws org.dmlc.xgboost4j.util.XgboostError
|
||||
*/
|
||||
public DMatrix(String dataPath) throws XgboostError {
|
||||
if(dataPath == null) {
|
||||
throw new NullPointerException("dataPath: null");
|
||||
}
|
||||
long[] out = new long[1];
|
||||
ErrorHandle.checkCall(XgboostJNI.XGDMatrixCreateFromFile(dataPath, 1, out));
|
||||
handle = out[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user