public class XGBoostUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
XGBoostUtils.SparseMatrix
Sparse Matrix representation for XGBoost
|
protected static class |
XGBoostUtils.SparseMatrixDimensions
Dimensions of a Sparse Matrix
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
SPARSE_MATRIX_DIM |
| Constructor and Description |
|---|
XGBoostUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static XGBoostUtils.SparseMatrix |
allocateCSRMatrix(XGBoostUtils.SparseMatrixDimensions sparseMatrixDimensions)
Creates a
XGBoostUtils.SparseMatrix object with pre-instantiated backing arrays for row-oriented compression schema (CSR). |
static hex.tree.xgboost.XGBoostUtils.FeatureProperties |
assembleFeatureNames(hex.DataInfo di) |
protected static XGBoostUtils.SparseMatrixDimensions |
calculateCSRMatrixDimensions(water.fvec.Chunk[] chunks,
hex.DataInfo di,
int weightColIndex) |
protected static XGBoostUtils.SparseMatrixDimensions |
calculateCSRMatrixDimensions(water.fvec.Frame f,
int[] chunks,
water.fvec.Vec.Reader[] vecs,
water.fvec.Vec.Reader w,
hex.DataInfo di) |
static ml.dmlc.xgboost4j.java.DMatrix |
convertChunksToDMatrix(hex.DataInfo di,
water.fvec.Chunk[] chunks,
int response,
int weight,
int fold,
boolean sparse)
convert a set of H2O chunks (representing a part of a vector) to a sparse DMatrix
|
static ml.dmlc.xgboost4j.java.DMatrix |
convertFrameToDMatrix(hex.DataInfo di,
water.fvec.Frame f,
boolean onlyLocal,
java.lang.String response,
java.lang.String weight,
java.lang.String fold,
boolean sparse)
convert an H2O Frame to a sparse DMatrix
|
protected static ml.dmlc.xgboost4j.java.DMatrix |
csr(water.fvec.Chunk[] chunks,
int weight,
int respIdx,
water.fvec.Frame f,
int[] chunksIds,
water.fvec.Vec.Reader[] vecs,
water.fvec.Vec.Reader w,
water.fvec.Vec.Reader respReader,
int nRows,
hex.DataInfo di,
float[] resp,
float[] weights) |
protected static int |
initalizeFromChunkIds(water.fvec.Frame f,
int[] chunks,
water.fvec.Vec.Reader[] vecs,
water.fvec.Vec.Reader w,
hex.DataInfo di,
int actualRows,
long[][] rowHeaders,
float[][] data,
int[][] colIndex,
water.fvec.Vec.Reader respVec,
float[] resp,
float[] weights) |
static java.lang.String |
makeFeatureMap(water.fvec.Frame f,
hex.DataInfo di) |
public static java.lang.String makeFeatureMap(water.fvec.Frame f,
hex.DataInfo di)
public static ml.dmlc.xgboost4j.java.DMatrix convertFrameToDMatrix(hex.DataInfo di,
water.fvec.Frame f,
boolean onlyLocal,
java.lang.String response,
java.lang.String weight,
java.lang.String fold,
boolean sparse)
throws ml.dmlc.xgboost4j.java.XGBoostError
f - H2O FrameonlyLocal - if true uses only chunks local to this noderesponse - name of the response columnweight - name of the weight columnfold - name of the fold assignment columnml.dmlc.xgboost4j.java.XGBoostErrorpublic static ml.dmlc.xgboost4j.java.DMatrix convertChunksToDMatrix(hex.DataInfo di,
water.fvec.Chunk[] chunks,
int response,
int weight,
int fold,
boolean sparse)
throws ml.dmlc.xgboost4j.java.XGBoostError
response - name of the response columnweight - name of the weight columnfold - name of the fold assignment columnml.dmlc.xgboost4j.java.XGBoostErrorprotected static ml.dmlc.xgboost4j.java.DMatrix csr(water.fvec.Chunk[] chunks,
int weight,
int respIdx,
water.fvec.Frame f,
int[] chunksIds,
water.fvec.Vec.Reader[] vecs,
water.fvec.Vec.Reader w,
water.fvec.Vec.Reader respReader,
int nRows,
hex.DataInfo di,
float[] resp,
float[] weights)
throws ml.dmlc.xgboost4j.java.XGBoostError
ml.dmlc.xgboost4j.java.XGBoostErrorprotected static int initalizeFromChunkIds(water.fvec.Frame f,
int[] chunks,
water.fvec.Vec.Reader[] vecs,
water.fvec.Vec.Reader w,
hex.DataInfo di,
int actualRows,
long[][] rowHeaders,
float[][] data,
int[][] colIndex,
water.fvec.Vec.Reader respVec,
float[] resp,
float[] weights)
protected static XGBoostUtils.SparseMatrix allocateCSRMatrix(XGBoostUtils.SparseMatrixDimensions sparseMatrixDimensions)
XGBoostUtils.SparseMatrix object with pre-instantiated backing arrays for row-oriented compression schema (CSR).
All backing arrays are allocated using MemoryManager.sparseMatrixDimensions - Dimensions of a sparse matrixXGBoostUtils.SparseMatrix with pre-allocated backing arrays.protected static XGBoostUtils.SparseMatrixDimensions calculateCSRMatrixDimensions(water.fvec.Chunk[] chunks, hex.DataInfo di, int weightColIndex)
protected static XGBoostUtils.SparseMatrixDimensions calculateCSRMatrixDimensions(water.fvec.Frame f, int[] chunks, water.fvec.Vec.Reader[] vecs, water.fvec.Vec.Reader w, hex.DataInfo di)
public static hex.tree.xgboost.XGBoostUtils.FeatureProperties assembleFeatureNames(hex.DataInfo di)