Package ai.djl.ml.xgboost
Class XgbNDArray
java.lang.Object
ai.djl.ndarray.NDArrayAdapter
ai.djl.ml.xgboost.XgbNDArray
- All Implemented Interfaces:
ai.djl.ndarray.BytesSupplier,ai.djl.ndarray.NDArray,ai.djl.ndarray.NDResource,AutoCloseable
public class XgbNDArray
extends ai.djl.ndarray.NDArrayAdapter
XgbNDArray is the XGBoost implementation of NDArray.-
Field Summary
Fields inherited from class ai.djl.ndarray.NDArrayAdapter
alternativeArray, alternativeManager, dataType, isClosed, manager, name, shape, uid -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddetach()longReturns the native XGBoost Booster pointer.ai.djl.ndarray.types.SparseFormatvoidintern(ai.djl.ndarray.NDArray replaced) voidreturnResource(ai.djl.ndarray.NDManager manager) toByteBuffer(boolean tryDirect) Methods inherited from class ai.djl.ndarray.NDArrayAdapter
abs, acos, acosh, add, add, addi, addi, argMax, argMax, argMin, argMin, argSort, asin, asinh, atan, atan2, atanh, attach, batchDot, batchMatMul, booleanMask, broadcast, cbrt, ceil, clip, complex, conj, contentEquals, contentEquals, cos, cosh, cumProd, cumProd, cumSum, cumSum, diff, div, div, divi, divi, dot, eq, eq, equals, erf, erfinv, exp, expandDims, fft, fft2, flatten, flatten, flip, floor, gammaln, gather, gatherNd, get, getDataType, getDevice, getGradient, getManager, getName, getNDArrayInternal, getShape, getUid, gt, gt, gte, gte, hasGradient, hashCode, ifft, ifft2, inverse, irfft, isInfinite, isNaN, isReleased, log, log10, log2, logicalAnd, logicalNot, logicalOr, logicalXor, logSoftmax, lt, lt, lte, lte, matMul, max, max, maximum, maximum, mean, mean, median, median, min, min, minimum, minimum, mod, mod, modi, modi, mul, mul, muli, muli, neg, negi, neq, neq, nonzero, norm, norm, normalize, oneHot, pad, percentile, percentile, pow, pow, powi, powi, prod, prod, put, real, repeat, repeat, repeat, repeat, reshape, rfft, rotate90, round, scatter, sequenceMask, sequenceMask, set, set, set, set, set, setName, setRequiresGradient, setScalar, sign, signi, sin, sinh, softmax, sort, sort, split, split, sqrt, square, squeeze, stft, stopGradient, sub, sub, subi, subi, sum, sum, take, tan, tanh, tempAttach, tile, tile, tile, tile, toDegrees, toDense, toDevice, topK, toRadians, toSparse, toString, toStringArray, toType, trace, transpose, transpose, trunc, unique, xlogyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.djl.ndarray.BytesSupplier
getAsBytes, getAsObject, getAsStringMethods inherited from interface ai.djl.ndarray.NDArray
all, allClose, allClose, any, argSort, argSort, booleanMask, broadcast, concat, concat, copyTo, countNonzero, countNonzero, duplicate, encode, fft, fft2, get, get, get, get, get, getBoolean, getByte, getDouble, getFloat, getInt, getLong, getResourceNDArrays, getScalar, getUint8, ifft, ifft2, irfft, isEmpty, isScalar, isSparse, like, max, mean, min, none, norm, norm, norm, normalize, normalize, oneHot, oneHot, onesLike, prod, reshape, rfft, scaleGradient, set, set, set, set, set, shapeEquals, size, size, split, split, squeeze, squeeze, stack, stack, stft, sum, swapAxes, take, toArray, toBooleanArray, toByteArray, toByteBuffer, toDebugString, toDebugString, toDebugString, toDoubleArray, toFloatArray, toIntArray, toLongArray, topK, toShortArray, toStringArray, toUint8Array, toUnsignedIntArray, toUnsignedShortArray, trace, trace, unique, unique, zerosLike
-
Method Details
-
getHandle
public long getHandle()Returns the native XGBoost Booster pointer.- Returns:
- the pointer
-
getSparseFormat
public ai.djl.ndarray.types.SparseFormat getSparseFormat()- Specified by:
getSparseFormatin interfaceai.djl.ndarray.NDArray- Overrides:
getSparseFormatin classai.djl.ndarray.NDArrayAdapter
-
toByteBuffer
-
intern
public void intern(ai.djl.ndarray.NDArray replaced) -
returnResource
public void returnResource(ai.djl.ndarray.NDManager manager) -
detach
public void detach() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceai.djl.ndarray.NDArray- Specified by:
closein interfaceai.djl.ndarray.NDResource- Overrides:
closein classai.djl.ndarray.NDArrayAdapter
-