Class ListDataSource<T extends Output<T>>

java.lang.Object
org.tribuo.datasource.ListDataSource<T>
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.Provenancable<DataSourceProvenance>, Iterable<Example<T>>, DataSource<T>

public class ListDataSource<T extends Output<T>> extends Object implements DataSource<T>
A data source which wraps up a list of Examples along with their DataSourceProvenance and an OutputFactory.

Used for machine generated data, or some other place where it's difficult to write a specific data source.

  • Constructor Details

    • ListDataSource

      public ListDataSource(List<Example<T>> list, OutputFactory<T> factory, DataSourceProvenance provenance)
      Constructs an in-memory data source wrapping the supplied examples.
      Parameters:
      list - The examples.
      factory - The output factory.
      provenance - The data source provenance.
  • Method Details