public class SparseMatrixFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SparseMatrixFactory.SparseDMatrixProvider |
| Constructor and Description |
|---|
SparseMatrixFactory() |
| Modifier and Type | Method and Description |
|---|---|
static SparseMatrix |
allocateCSRMatrix(SparseMatrixDimensions sparseMatrixDimensions)
Creates a
SparseMatrix object with pre-instantiated backing arrays for row-oriented compression schema (CSR). |
protected static SparseMatrixDimensions |
calculateCSRMatrixDimensions(water.fvec.Chunk[] chunks,
hex.DataInfo di,
int weightColIndex) |
static SparseMatrixDimensions |
calculateCSRMatrixDimensions(water.fvec.Frame f,
int[] chunkIds,
water.fvec.Vec w,
hex.DataInfo di) |
static ai.h2o.xgboost4j.java.DMatrix |
csr(water.fvec.Chunk[] chunks,
int weight,
int respIdx,
int offsetIdx,
hex.DataInfo di,
float[] resp,
float[] weights,
float[] offsets) |
static MatrixLoader.DMatrixProvider |
csr(water.fvec.Frame frame,
int[] chunksIds,
water.fvec.Vec weightsVec,
water.fvec.Vec offsetsVec,
water.fvec.Vec responseVec,
hex.DataInfo di,
float[] resp,
float[] weights,
float[] offsets) |
static int |
initializeFromChunkIds(water.fvec.Frame frame,
int[] chunks,
water.fvec.Vec weightsVec,
water.fvec.Vec offsetsVec,
hex.DataInfo di,
SparseMatrix matrix,
SparseMatrixDimensions dimensions,
water.fvec.Vec respVec,
float[] resp,
float[] weights,
float[] offsets) |
static SparseMatrixFactory.SparseDMatrixProvider |
toDMatrix(SparseMatrix sm,
SparseMatrixDimensions smd,
int actualRows,
int shape,
float[] resp,
float[] weights,
float[] offsets) |
public static MatrixLoader.DMatrixProvider csr(water.fvec.Frame frame, int[] chunksIds, water.fvec.Vec weightsVec, water.fvec.Vec offsetsVec, water.fvec.Vec responseVec, hex.DataInfo di, float[] resp, float[] weights, float[] offsets)
public static ai.h2o.xgboost4j.java.DMatrix csr(water.fvec.Chunk[] chunks,
int weight,
int respIdx,
int offsetIdx,
hex.DataInfo di,
float[] resp,
float[] weights,
float[] offsets)
throws ai.h2o.xgboost4j.java.XGBoostError
ai.h2o.xgboost4j.java.XGBoostErrorpublic static SparseMatrixFactory.SparseDMatrixProvider toDMatrix(SparseMatrix sm, SparseMatrixDimensions smd, int actualRows, int shape, float[] resp, float[] weights, float[] offsets)
public static int initializeFromChunkIds(water.fvec.Frame frame,
int[] chunks,
water.fvec.Vec weightsVec,
water.fvec.Vec offsetsVec,
hex.DataInfo di,
SparseMatrix matrix,
SparseMatrixDimensions dimensions,
water.fvec.Vec respVec,
float[] resp,
float[] weights,
float[] offsets)
public static SparseMatrix allocateCSRMatrix(SparseMatrixDimensions sparseMatrixDimensions)
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 matrixSparseMatrix with pre-allocated backing arrays.protected static SparseMatrixDimensions calculateCSRMatrixDimensions(water.fvec.Chunk[] chunks, hex.DataInfo di, int weightColIndex)
public static SparseMatrixDimensions calculateCSRMatrixDimensions(water.fvec.Frame f, int[] chunkIds, water.fvec.Vec w, hex.DataInfo di)