Class DataBatch

java.lang.Object
ml.dmlc.xgboost4j.java.DataBatch

class DataBatch extends Object
A mini-batch of data that can be converted to DMatrix. The data is in sparse matrix CSR format. This class is used to support advanced creation of DMatrix from Iterator of DataBatch,
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final int[]
    index of each feature(column) in the sparse matrix
    (package private) final float[]
    value of each non-missing entry in the sparse matrix
    (package private) final float[]
    label of each data point, can be null
    private static final org.apache.commons.logging.Log
     
    (package private) final long[]
    The offset of each rows in the sparse matrix
    (package private) final float[]
    weight of each data point, can be null
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataBatch(long[] rowOffset, float[] weight, float[] label, int[] featureIndex, float[] featureValue)
     
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      private static final org.apache.commons.logging.Log logger
    • rowOffset

      final long[] rowOffset
      The offset of each rows in the sparse matrix
    • weight

      final float[] weight
      weight of each data point, can be null
    • label

      final float[] label
      label of each data point, can be null
    • featureIndex

      final int[] featureIndex
      index of each feature(column) in the sparse matrix
    • featureValue

      final float[] featureValue
      value of each non-missing entry in the sparse matrix
  • Constructor Details

    • DataBatch

      DataBatch(long[] rowOffset, float[] weight, float[] label, int[] featureIndex, float[] featureValue)