Class IDXDataSource.IDXData

java.lang.Object
org.tribuo.datasource.IDXDataSource.IDXData
Enclosing class:
IDXDataSource<T extends Output<T>>

public static class IDXDataSource.IDXData extends Object
Java side representation for an IDX file.
  • Method Details

    • createIDXData

      public static IDXDataSource.IDXData createIDXData(IDXDataSource.IDXType dataType, int[] shape, double[] data)
      Constructs an IDXData, validating the input and defensively copying it.
      Parameters:
      dataType - The data type.
      shape - The tensor shape.
      data - The data to write.
      Returns:
      An IDXData.
    • save

      public void save(Path outputPath, boolean gzip) throws IOException
      Writes out this IDXData to the specified path.
      Parameters:
      outputPath - The path to write to.
      gzip - If true, gzip the output.
      Throws:
      IOException - If the write failed.