Fix warnings when generating javadoc

This commit is contained in:
damiencarol 2016-01-09 15:53:35 +01:00
parent 89216e239f
commit fd3baf68f1
3 changed files with 36 additions and 26 deletions

View File

@ -90,7 +90,7 @@ public class DMatrix {
* @param data data values
* @param nrow number of rows
* @param ncol number of columns
* @throws org.dmlc.xgboost4j.util.XGBoostError Native error
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public DMatrix(float[] data, int nrow, int ncol) throws XGBoostError {
long[] out = new long[1];
@ -111,6 +111,7 @@ public class DMatrix {
/**
* set label of dmatrix
* @param labels labels
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public void setLabel(float[] labels) throws XGBoostError {
ErrorHandle.checkCall(XgboostJNI.XGDMatrixSetFloatInfo(handle, "label", labels));
@ -119,7 +120,7 @@ public class DMatrix {
/**
* set weight of each instance
* @param weights weights
* @throws org.dmlc.xgboost4j.util.XGBoostError Native error
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public void setWeight(float[] weights) throws XGBoostError {
ErrorHandle.checkCall(XgboostJNI.XGDMatrixSetFloatInfo(handle, "weight", weights));
@ -196,7 +197,7 @@ public class DMatrix {
/**
* Slice the DMatrix and return a new DMatrix that only contains `rowIndex`.
* @param rowIndex
* @param rowIndex row index
* @return sliced new DMatrix
* @throws org.dmlc.xgboost4j.util.XGBoostError Native error
*/
@ -221,12 +222,16 @@ public class DMatrix {
/**
* save DMatrix to filePath
* @param filePath
* @param filePath file path
*/
public void saveBinary(String filePath) {
XgboostJNI.XGDMatrixSaveBinary(handle, filePath, 1);
}
/**
* Get the handle
* @return native handler id
*/
public long getHandle() {
return handle;
}

View File

@ -17,20 +17,25 @@ package org.dmlc.xgboost4j;
/**
* interface for customized evaluation
*
* @author hzx
*/
public interface IEvaluation {
/**
* get evaluate metric
*
* @return evalMetric
*/
public abstract String getMetric();
/**
* evaluate with predicts and data
*
* @param predicts
* predictions as array
* @param dmat
* @return
* data matrix to evaluate
* @return result of the metric
*/
public abstract float eval(float[][] predicts, DMatrix dmat);
}

View File

@ -37,7 +37,7 @@ public class CVPack {
* @param dtrain train data
* @param dtest test data
* @param params parameters
* @throws org.dmlc.xgboost4j.util.XGBoostError
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public CVPack(DMatrix dtrain, DMatrix dtest, Iterable<Map.Entry<String, Object>> params) throws XGBoostError {
dmats = new DMatrix[] {dtrain, dtest};
@ -50,7 +50,7 @@ public class CVPack {
/**
* update one iteration
* @param iter iteration num
* @throws org.dmlc.xgboost4j.util.XGBoostError
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public void update(int iter) throws XGBoostError {
booster.update(dtrain, iter);
@ -60,7 +60,7 @@ public class CVPack {
* update one iteration
* @param iter iteration num
* @param obj customized objective
* @throws org.dmlc.xgboost4j.util.XGBoostError
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public void update(int iter, IObjective obj) throws XGBoostError {
booster.update(dtrain, iter, obj);
@ -69,8 +69,8 @@ public class CVPack {
/**
* evaluation
* @param iter iteration num
* @return
* @throws org.dmlc.xgboost4j.util.XGBoostError
* @return evaluation
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public String eval(int iter) throws XGBoostError {
return booster.evalSet(dmats, names, iter);
@ -80,8 +80,8 @@ public class CVPack {
* evaluation
* @param iter iteration num
* @param eval customized eval
* @return
* @throws org.dmlc.xgboost4j.util.XGBoostError
* @return evaluation
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
*/
public String eval(int iter, IEvaluation eval) throws XGBoostError {
return booster.evalSet(dmats, names, iter, eval);