The samples field of the Trial class stores the raw samples from datasets. The field is currently a list of samples, with each sample represented by another list. The field should be, however, a dataframe, with each row corresponding with one sample, or a list of objects, with each object corresponding with one sample. This way, it will be clearer what features each sample has.
With the new design (functional programming), samples is now an independent dataframe that stores every raw sample from a dataset. Each column of samples is also clearly labeled.
The
samples
field of theTrial
class stores the raw samples from datasets. The field is currently a list of samples, with each sample represented by another list. The field should be, however, a dataframe, with each row corresponding with one sample, or a list of objects, with each object corresponding with one sample. This way, it will be clearer what features each sample has.Represent each sample with a list can lead to the use of magic numbers to access sample's information. An example can be seen below: https://github.com/nalmadi/EMIP-Toolkit/blob/d1a7eabd08ca27c062b5f14118395eaea8d5eac2/emip_toolkit.py#L431-L436