Fix warnings when generating javadoc
This commit is contained in:
parent
89216e239f
commit
fd3baf68f1
@ -90,7 +90,7 @@ public class DMatrix {
|
|||||||
* @param data data values
|
* @param data data values
|
||||||
* @param nrow number of rows
|
* @param nrow number of rows
|
||||||
* @param ncol number of columns
|
* @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 {
|
public DMatrix(float[] data, int nrow, int ncol) throws XGBoostError {
|
||||||
long[] out = new long[1];
|
long[] out = new long[1];
|
||||||
@ -111,6 +111,7 @@ public class DMatrix {
|
|||||||
/**
|
/**
|
||||||
* set label of dmatrix
|
* set label of dmatrix
|
||||||
* @param labels labels
|
* @param labels labels
|
||||||
|
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
|
||||||
*/
|
*/
|
||||||
public void setLabel(float[] labels) throws XGBoostError {
|
public void setLabel(float[] labels) throws XGBoostError {
|
||||||
ErrorHandle.checkCall(XgboostJNI.XGDMatrixSetFloatInfo(handle, "label", labels));
|
ErrorHandle.checkCall(XgboostJNI.XGDMatrixSetFloatInfo(handle, "label", labels));
|
||||||
@ -119,7 +120,7 @@ public class DMatrix {
|
|||||||
/**
|
/**
|
||||||
* set weight of each instance
|
* set weight of each instance
|
||||||
* @param weights weights
|
* @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 {
|
public void setWeight(float[] weights) throws XGBoostError {
|
||||||
ErrorHandle.checkCall(XgboostJNI.XGDMatrixSetFloatInfo(handle, "weight", weights));
|
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`.
|
* Slice the DMatrix and return a new DMatrix that only contains `rowIndex`.
|
||||||
* @param rowIndex
|
* @param rowIndex row index
|
||||||
* @return sliced new DMatrix
|
* @return sliced new DMatrix
|
||||||
* @throws org.dmlc.xgboost4j.util.XGBoostError Native error
|
* @throws org.dmlc.xgboost4j.util.XGBoostError Native error
|
||||||
*/
|
*/
|
||||||
@ -221,12 +222,16 @@ public class DMatrix {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* save DMatrix to filePath
|
* save DMatrix to filePath
|
||||||
* @param filePath
|
* @param filePath file path
|
||||||
*/
|
*/
|
||||||
public void saveBinary(String filePath) {
|
public void saveBinary(String filePath) {
|
||||||
XgboostJNI.XGDMatrixSaveBinary(handle, filePath, 1);
|
XgboostJNI.XGDMatrixSaveBinary(handle, filePath, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the handle
|
||||||
|
* @return native handler id
|
||||||
|
*/
|
||||||
public long getHandle() {
|
public long getHandle() {
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,21 +16,26 @@
|
|||||||
package org.dmlc.xgboost4j;
|
package org.dmlc.xgboost4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface for customized evaluation
|
* interface for customized evaluation
|
||||||
|
*
|
||||||
* @author hzx
|
* @author hzx
|
||||||
*/
|
*/
|
||||||
public interface IEvaluation {
|
public interface IEvaluation {
|
||||||
/**
|
/**
|
||||||
* get evaluate metric
|
* get evaluate metric
|
||||||
* @return evalMetric
|
*
|
||||||
*/
|
* @return evalMetric
|
||||||
public abstract String getMetric();
|
*/
|
||||||
|
public abstract String getMetric();
|
||||||
/**
|
|
||||||
* evaluate with predicts and data
|
/**
|
||||||
* @param predicts
|
* evaluate with predicts and data
|
||||||
* @param dmat
|
*
|
||||||
* @return
|
* @param predicts
|
||||||
*/
|
* predictions as array
|
||||||
public abstract float eval(float[][] predicts, DMatrix dmat);
|
* @param dmat
|
||||||
|
* data matrix to evaluate
|
||||||
|
* @return result of the metric
|
||||||
|
*/
|
||||||
|
public abstract float eval(float[][] predicts, DMatrix dmat);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class CVPack {
|
|||||||
* @param dtrain train data
|
* @param dtrain train data
|
||||||
* @param dtest test data
|
* @param dtest test data
|
||||||
* @param params parameters
|
* @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 {
|
public CVPack(DMatrix dtrain, DMatrix dtest, Iterable<Map.Entry<String, Object>> params) throws XGBoostError {
|
||||||
dmats = new DMatrix[] {dtrain, dtest};
|
dmats = new DMatrix[] {dtrain, dtest};
|
||||||
@ -50,7 +50,7 @@ public class CVPack {
|
|||||||
/**
|
/**
|
||||||
* update one iteration
|
* update one iteration
|
||||||
* @param iter iteration num
|
* @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 {
|
public void update(int iter) throws XGBoostError {
|
||||||
booster.update(dtrain, iter);
|
booster.update(dtrain, iter);
|
||||||
@ -60,7 +60,7 @@ public class CVPack {
|
|||||||
* update one iteration
|
* update one iteration
|
||||||
* @param iter iteration num
|
* @param iter iteration num
|
||||||
* @param obj customized objective
|
* @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 {
|
public void update(int iter, IObjective obj) throws XGBoostError {
|
||||||
booster.update(dtrain, iter, obj);
|
booster.update(dtrain, iter, obj);
|
||||||
@ -69,8 +69,8 @@ public class CVPack {
|
|||||||
/**
|
/**
|
||||||
* evaluation
|
* evaluation
|
||||||
* @param iter iteration num
|
* @param iter iteration num
|
||||||
* @return
|
* @return evaluation
|
||||||
* @throws org.dmlc.xgboost4j.util.XGBoostError
|
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
|
||||||
*/
|
*/
|
||||||
public String eval(int iter) throws XGBoostError {
|
public String eval(int iter) throws XGBoostError {
|
||||||
return booster.evalSet(dmats, names, iter);
|
return booster.evalSet(dmats, names, iter);
|
||||||
@ -80,8 +80,8 @@ public class CVPack {
|
|||||||
* evaluation
|
* evaluation
|
||||||
* @param iter iteration num
|
* @param iter iteration num
|
||||||
* @param eval customized eval
|
* @param eval customized eval
|
||||||
* @return
|
* @return evaluation
|
||||||
* @throws org.dmlc.xgboost4j.util.XGBoostError
|
* @throws org.dmlc.xgboost4j.util.XGBoostError native error
|
||||||
*/
|
*/
|
||||||
public String eval(int iter, IEvaluation eval) throws XGBoostError {
|
public String eval(int iter, IEvaluation eval) throws XGBoostError {
|
||||||
return booster.evalSet(dmats, names, iter, eval);
|
return booster.evalSet(dmats, names, iter, eval);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user