Class XgbNDManager

  • All Implemented Interfaces:
    ai.djl.ndarray.NDManager, java.lang.AutoCloseable

    public class XgbNDManager
    extends ai.djl.ndarray.BaseNDManager
    XgbNDManager is the XGBoost implementation of NDManager.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class ai.djl.ndarray.BaseNDManager

        ai.djl.ndarray.BaseNDManager.TempResource
      • Nested classes/interfaces inherited from interface ai.djl.ndarray.NDManager

        ai.djl.ndarray.NDManager.SystemNDManager
    • Field Summary

      • Fields inherited from class ai.djl.ndarray.BaseNDManager

        alternativeManager, capped, closed, device, name, parent, resources, tempResources, uid
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer allocateDirect​(int capacity)
      ai.djl.ndarray.NDArray create​(java.nio.Buffer data, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
      ai.djl.ndarray.NDArray create​(ml.dmlc.xgboost4j.java.ColumnBatch columnBatch, float missing, int nthread)
      Creates XgbNDArray from column array interface.
      ai.djl.ndarray.NDArray createCSR​(java.nio.Buffer buffer, long[] indptr, long[] indices, ai.djl.ndarray.types.Shape shape)
      XgbNDArray from​(ai.djl.ndarray.NDArray array)
      ai.djl.engine.Engine getEngine()
      ai.djl.ndarray.NDManager newSubManager​(ai.djl.Device device)
      void setMissingValue​(float missingValue)
      Sets the default missing value.
      • Methods inherited from class ai.djl.ndarray.BaseNDManager

        arange, attachInternal, attachUncappedInternal, cap, close, copyBuffer, create, create, createCoo, createRowSparse, debugDump, defaultDevice, detachInternal, eye, full, getDevice, getManagedArrays, getName, getParentManager, invoke, invoke, isOpen, linspace, load, newSubManager, randomInteger, randomMultinomial, randomMultinomial, randomNormal, randomPermutation, randomUniform, sampleGamma, sampleGamma, sampleNormal, sampleNormal, samplePoisson, samplePoisson, setName, tempAttachInternal, toString, truncatedNormal, validateBuffer
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface ai.djl.ndarray.NDManager

        arange, arange, arange, arange, arange, arange, arange, arange, attachAll, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createCSR, createCSR, createRowSparse, decode, decode, eye, eye, eye, eye, full, full, full, hanningWindow, linspace, linspace, linspace, linspace, load, ones, ones, ones, randomNormal, randomNormal, randomNormal, randomUniform, randomUniform, ret, tempAttachAll, truncatedNormal, truncatedNormal, truncatedNormal, zeros, zeros, zeros
    • Method Detail

      • setMissingValue

        public void setMissingValue​(float missingValue)
        Sets the default missing value.
        Parameters:
        missingValue - the default missing value
      • allocateDirect

        public java.nio.ByteBuffer allocateDirect​(int capacity)
      • from

        public XgbNDArray from​(ai.djl.ndarray.NDArray array)
      • newSubManager

        public ai.djl.ndarray.NDManager newSubManager​(ai.djl.Device device)
      • getEngine

        public ai.djl.engine.Engine getEngine()
      • create

        public ai.djl.ndarray.NDArray create​(ml.dmlc.xgboost4j.java.ColumnBatch columnBatch,
                                             float missing,
                                             int nthread)
        Creates XgbNDArray from column array interface.
        Parameters:
        columnBatch - – the XGBoost ColumnBatch to provide the cuda array interface of feature columns
        missing - – missing value
        nthread - – threads number
        Returns:
        a new instance of NDArray
      • create

        public ai.djl.ndarray.NDArray create​(java.nio.Buffer data,
                                             ai.djl.ndarray.types.Shape shape,
                                             ai.djl.ndarray.types.DataType dataType)
      • createCSR

        public ai.djl.ndarray.NDArray createCSR​(java.nio.Buffer buffer,
                                                long[] indptr,
                                                long[] indices,
                                                ai.djl.ndarray.types.Shape shape)
        Specified by:
        createCSR in interface ai.djl.ndarray.NDManager
        Overrides:
        createCSR in class ai.djl.ndarray.BaseNDManager