Wrapping up data

To provide a consistent form for data (such as observations, parameter ensembles, model evaluations) across the package, we store the data in simple wrappers internally.

Data is always stored as columns of AbstractMatrix. That is, we obey the format

[ data dimension x number of data samples ]

The DataContainer

A DataContainer is constructed initially by copying and perhaps transposing matrix data

dc = DataContainer(abstract_matrix; data_are_columns = true)

The flag data_are_columns indicates whether the provided data is stored column- or row-wise. The data is retrieved with

get_data(dc)

The PairedDataContainer

A PairedDataContainer stores pairs of inputs and outputs in the form of DataContainers. It is constructed from two data matrices, or from two DataContainers.

pdc = PairedDataContainer(input_matrix, output_matrix; data_are_columns = true)
pdc = PairedDataContainer(input_data_container, output_data_container)

Data is retrieved with

get_data(pdc) # returns both inputs and outputs
get_inputs(pdc)
get_outputs(pdc)