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