Package com.bayesserver.data
Class DataTableEvidenceReaderCommandFactory
- java.lang.Object
-
- com.bayesserver.data.DataTableEvidenceReaderCommandFactory
-
- All Implemented Interfaces:
EvidenceReaderCommandFactory
public final class DataTableEvidenceReaderCommandFactory extends Object implements EvidenceReaderCommandFactory
A default implementation ofEvidenceReaderCommandFactorybased on a DataTable and a simple partitioning scheme based on a partition column. In order to calculate the partition for a record, the value in the partition column modulo the number of partitions is used.
-
-
Constructor Summary
Constructors Constructor Description DataTableEvidenceReaderCommandFactory(DataTable data, List<VariableReference> variables, ReaderOptions readerOptions, String partitionColumn)Initializes a new instance of theDataTableEvidenceReaderCommandFactoryclass.DataTableEvidenceReaderCommandFactory(DataTable data, List<VariableReference> variables, ReaderOptions readerOptions, String partitionColumn, DataTable temporalData, List<VariableReference> temporalVariables, TemporalReaderOptions temporalReaderOptions, String temporalPartitionColumn)Initializes a new instance of theDataTableEvidenceReaderCommandFactoryclass.DataTableEvidenceReaderCommandFactory(DataTable temporalData, List<VariableReference> temporalVariables, TemporalReaderOptions temporalReaderOptions, String temporalPartitionColumn)Initializes a new instance of theDataTableEvidenceReaderCommandFactoryclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvidenceReaderCommandcreate(Network network)Create an evidence reader command, based on a specific network which may be a copy of the original.EvidenceReaderCommandcreatePartitioned(Network network, DataPartitioning dataPartitioning, int partitionCount)Create an evidence reader command on a partition, based on a specific network which may be a copy of the original.
-
-
-
Constructor Detail
-
DataTableEvidenceReaderCommandFactory
public DataTableEvidenceReaderCommandFactory(DataTable data, List<VariableReference> variables, ReaderOptions readerOptions, String partitionColumn)
Initializes a new instance of theDataTableEvidenceReaderCommandFactoryclass.- Parameters:
data- Non-temporal data.variables- Non-temporal variable references.readerOptions- Non-temporal options for reading the data.partitionColumn- A partition column for the non-temporal data.
-
DataTableEvidenceReaderCommandFactory
public DataTableEvidenceReaderCommandFactory(DataTable temporalData, List<VariableReference> temporalVariables, TemporalReaderOptions temporalReaderOptions, String temporalPartitionColumn)
Initializes a new instance of theDataTableEvidenceReaderCommandFactoryclass.- Parameters:
temporalData- Temporal data.temporalVariables- Temporal variablestemporalReaderOptions- Temporal options for reading the datatemporalPartitionColumn- A partition column for the temporal data.
-
DataTableEvidenceReaderCommandFactory
public DataTableEvidenceReaderCommandFactory(DataTable data, List<VariableReference> variables, ReaderOptions readerOptions, String partitionColumn, DataTable temporalData, List<VariableReference> temporalVariables, TemporalReaderOptions temporalReaderOptions, String temporalPartitionColumn)
Initializes a new instance of theDataTableEvidenceReaderCommandFactoryclass.- Parameters:
data- Non-temporal data.variables- Non-temporal variable references.readerOptions- Non-temporal options for reading the data.partitionColumn- A partition column for the non-temporal data.temporalData- Temporal data.temporalVariables- Temporal variablestemporalReaderOptions- Temporal options for reading the datatemporalPartitionColumn- A partition column for the temporal data.
-
-
Method Detail
-
create
public EvidenceReaderCommand create(Network network)
Create an evidence reader command, based on a specific network which may be a copy of the original.- Specified by:
createin interfaceEvidenceReaderCommandFactory- Parameters:
network- The network to base the reader on.- Returns:
- A new evidence reader command.
-
createPartitioned
public EvidenceReaderCommand createPartitioned(Network network, DataPartitioning dataPartitioning, int partitionCount)
Create an evidence reader command on a partition, based on a specific network which may be a copy of the original.- Specified by:
createPartitionedin interfaceEvidenceReaderCommandFactory- Parameters:
network- The network to base the reader on.dataPartitioning- The partition number and method such as include/exclude.partitionCount- The total number of partitions.- Returns:
- A new evidence reader command.
-
-