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 ofEvidenceReaderCommandFactory
based 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 theDataTableEvidenceReaderCommandFactory
class.DataTableEvidenceReaderCommandFactory(DataTable data, List<VariableReference> variables, ReaderOptions readerOptions, String partitionColumn, DataTable temporalData, List<VariableReference> temporalVariables, TemporalReaderOptions temporalReaderOptions, String temporalPartitionColumn)
Initializes a new instance of theDataTableEvidenceReaderCommandFactory
class.DataTableEvidenceReaderCommandFactory(DataTable temporalData, List<VariableReference> temporalVariables, TemporalReaderOptions temporalReaderOptions, String temporalPartitionColumn)
Initializes a new instance of theDataTableEvidenceReaderCommandFactory
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvidenceReaderCommand
create(Network network)
Create an evidence reader command, based on a specific network which may be a copy of the original.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.
-
-
-
Constructor Detail
-
DataTableEvidenceReaderCommandFactory
public DataTableEvidenceReaderCommandFactory(DataTable data, List<VariableReference> variables, ReaderOptions readerOptions, String partitionColumn)
Initializes a new instance of theDataTableEvidenceReaderCommandFactory
class.- 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 theDataTableEvidenceReaderCommandFactory
class.- 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 theDataTableEvidenceReaderCommandFactory
class.- 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:
create
in 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:
createPartitioned
in 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.
-
-