class DMatrix extends AnyRef
DMatrix for xgboost.
- Alphabetic
- By Inheritance
- DMatrix
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DMatrix(columnBatch: ColumnBatch, missing: Float, nthread: Int)
Create the normal DMatrix from column array interface
Create the normal DMatrix from column array interface
- columnBatch
the XGBoost ColumnBatch to provide the cuda array interface of feature columns
- missing
missing value
- nthread
threads number
- Exceptions thrown
- new DMatrix(handle: Long)
used for DMatrix slice
used for DMatrix slice
- Attributes
- protected[java]
- new DMatrix(matrix: BigDenseMatrix, missing: Float)
create DMatrix from dense matrix
create DMatrix from dense matrix
- matrix
instance of BigDenseMatrix
- missing
the specified value to represent the missing value
- new DMatrix(data: Array[Float], nrow: Int, ncol: Int, missing: Float)
create DMatrix from dense matrix
create DMatrix from dense matrix
- data
data values
- nrow
number of rows
- ncol
number of columns
- missing
the specified value to represent the missing value
- new DMatrix(matrix: BigDenseMatrix)
create DMatrix from a BigDenseMatrix
create DMatrix from a BigDenseMatrix
- matrix
instance of BigDenseMatrix
- Exceptions thrown
XGBoostError
native error
- new DMatrix(headers: Array[Long], indices: Array[Int], data: Array[Float], st: SparseType, shapeParam: Int, missing: Float, nthread: Int)
- new DMatrix(headers: Array[Long], indices: Array[Int], data: Array[Float], st: SparseType, shapeParam: Int)
Create DMatrix from Sparse matrix in CSR/CSC format.
Create DMatrix from Sparse matrix in CSR/CSC format.
- headers
The row index of the matrix.
- indices
The indices of presenting entries.
- data
The data content.
- st
Type of sparsity.
- shapeParam
when st is CSR, it specifies the column number, otherwise it is taken as row number
- Exceptions thrown
- new DMatrix(dataPath: String)
Create DMatrix by loading libsvm file from dataPath
Create DMatrix by loading libsvm file from dataPath
- dataPath
The path to the data.
- Exceptions thrown
- new DMatrix(iter: Iterator[LabeledPoint], cacheInfo: String)
- new DMatrix(data: Array[Float], nrow: Int, ncol: Int)
create DMatrix from dense matrix
create DMatrix from dense matrix
- data
data values
- nrow
number of rows
- ncol
number of columns
- Annotations
- @Deprecated
- Deprecated
- Exceptions thrown
XGBoostError
native error
- new DMatrix(headers: Array[Long], indices: Array[Int], data: Array[Float], st: SparseType)
Create DMatrix from Sparse matrix in CSR/CSC format.
Create DMatrix from Sparse matrix in CSR/CSC format.
- headers
The row index of the matrix.
- indices
The indices of presenting entries.
- data
The data content.
- st
Type of sparsity.
- Annotations
- @Deprecated
- Deprecated
- Exceptions thrown
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def dispose(): Unit
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- def getBaseMargin(): Array[Float]
Get base margin of the DMatrix.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def getFeatureNames(): Array[String]
Get feature names
Get feature names
- returns
an array of feature names to be returned
- Exceptions thrown
- def getFeatureTypes(): Array[String]
Get feature types
Get feature types
- returns
an array of feature types to be returned
- Exceptions thrown
- def getGroup(): Array[Int]
Get group sizes of DMatrix
- def getHandle(): Long
Get the handle
- def getLabel(): Array[Float]
get label values
- def getWeight(): Array[Float]
get weight of the DMatrix
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonMissingNum(): Long
Get the number of non-missing values of DMatrix.
Get the number of non-missing values of DMatrix.
- returns
The number of non-missing values
- Exceptions thrown
XGBoostError
native error
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def rowNum(): Long
get the row number of DMatrix
- def saveBinary(filePath: String): Unit
save DMatrix to filePath
- def setBaseMargin(baseMargin: Array[Array[Float]]): Unit
Set base margin (initial prediction).
- def setBaseMargin(baseMargin: Array[Float]): Unit
Set base margin (initial prediction).
Set base margin (initial prediction).
The margin must have the same number of elements as the number of rows in this matrix.
- def setBaseMargin(column: Column): Unit
Set base margin of DMatrix from cuda array interface
Set base margin of DMatrix from cuda array interface
- column
the XGBoost Column to provide the cuda array interface of base margin column
- Exceptions thrown
XGBoostError
native error
- def setFeatureNames(values: Array[String]): Unit
Set feature names
Set feature names
- values
feature names to be set
- Exceptions thrown
- def setFeatureTypes(values: Array[String]): Unit
Set feature types
Set feature types
- values
feature types to be set
- Exceptions thrown
- def setGroup(group: Array[Int]): Unit
Set group sizes of DMatrix (used for ranking)
Set group sizes of DMatrix (used for ranking)
- group
group size as array
- Exceptions thrown
XGBoostError
native error
- def setLabel(labels: Array[Float]): Unit
set label of dmatrix
- def setLabel(column: Column): Unit
Set label of DMatrix from cuda array interface
Set label of DMatrix from cuda array interface
- column
the XGBoost Column to provide the cuda array interface of label column
- Exceptions thrown
XGBoostError
native error
- def setWeight(weights: Array[Float]): Unit
set weight of each instance
- def setWeight(column: Column): Unit
Set weight of DMatrix from cuda array interface
Set weight of DMatrix from cuda array interface
- column
the XGBoost Column to provide the cuda array interface of weight column
- Exceptions thrown
XGBoostError
native error
- def slice(rowIndex: Array[Int]): DMatrix
Slice the DMatrix and return a new DMatrix that only contains
rowIndex
.Slice the DMatrix and return a new DMatrix that only contains
rowIndex
.- rowIndex
row index
- returns
sliced new DMatrix
- Exceptions thrown
XGBoostError
native error
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])