public class XGBoostUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
XGBoostUtils.FeatureProperties |
| Constructor and Description |
|---|
XGBoostUtils() |
| Modifier and Type | Method and Description |
|---|---|
static XGBoostUtils.FeatureProperties |
assembleFeatureNames(hex.DataInfo di) |
static ai.h2o.xgboost4j.java.DMatrix |
convertChunksToDMatrix(hex.DataInfo di,
water.fvec.Chunk[] chunks,
int response,
boolean sparse,
int offset)
convert a set of H2O chunks (representing a part of a vector) to a sparse DMatrix
|
static MatrixLoader.DMatrixProvider |
convertFrameToDMatrix(hex.DataInfo di,
water.fvec.Frame frame,
java.lang.String response,
java.lang.String weight,
java.lang.String offset,
boolean sparse)
convert an H2O Frame to a sparse DMatrix
|
static void |
createFeatureMap(XGBoostModel model,
water.fvec.Frame train) |
static long |
sumChunksLength(int[] chunkIds,
water.fvec.Vec vec,
java.util.Optional<water.fvec.Vec> weightsVector,
int[] chunkLengths)
Counts a total sum of chunks inside a vector.
|
public static void createFeatureMap(XGBoostModel model, water.fvec.Frame train)
public static MatrixLoader.DMatrixProvider convertFrameToDMatrix(hex.DataInfo di, water.fvec.Frame frame, java.lang.String response, java.lang.String weight, java.lang.String offset, boolean sparse)
di - data infoframe - H2O Frame - adapted using a provided data inforesponse - name of the response columnweight - name of the weight columnai.h2o.xgboost4j.java.XGBoostErrorpublic static long sumChunksLength(int[] chunkIds,
water.fvec.Vec vec,
java.util.Optional<water.fvec.Vec> weightsVector,
int[] chunkLengths)
chunkIds - Chunk ids to consider during the calculation. Chunks IDs not listed are not included.vec - Vector containing given chunk identifiersweightsVector - Vector with row weights, possibly an empty optionalchunkLengths - Array of integers where the lengths of the individual chunks will be added. Initialization to an array of 0's is expected.public static ai.h2o.xgboost4j.java.DMatrix convertChunksToDMatrix(hex.DataInfo di,
water.fvec.Chunk[] chunks,
int response,
boolean sparse,
int offset)
throws ai.h2o.xgboost4j.java.XGBoostError
ai.h2o.xgboost4j.java.XGBoostErrorpublic static XGBoostUtils.FeatureProperties assembleFeatureNames(hex.DataInfo di)