DataBlock

class aixd.data.DataBlock(dobj_list: List[DataObject], name: str | None = None, format_file: str = 'pkl', flag_split_perdim: bool = False, transformation: DataBlockTransformation | None = None, display_name: str | None = None)[source]

Bases: object

Generic block of data, i.e., a concatenation of different instances of data types

Parameters:
  • dobj_list (List[DataObject]) – A list of data objects.

  • name (str, optional) – A name for the data block

  • format_file (str, optional, default=”pkl”) – File format used for storage.

  • flag_split_perdim (bool, optional, default=False) – Flag to enable the splitting multidimensional DataObject’s

  • transformation (DataBlockTransformation, optional, default=None) – The per data block normalization.

  • display_name (str, optional, default=None) – The display name of the data block. If none it’s the same as the name.

Methods

check_data_consistency

Checks the data consistency.

get_cols_dobjs

In this case, the attributes can be either names of dimensions, or names of full data objects, and we need to return the precise column names that correspond to the attributes.

get_data_mat

Returns the data belonging to the requested DataObject's, as a single data matrix.

get_data_mat_dtypes

Returns the data types of the columns of the data matrix for the requested DataObject's.

get_data_mats

Returns the data belonging to the requested DataObject's, as a list of data matrices.

get_dobjs

Returns the data objects.

info_dobj

Returns information of all the DataObject's of the DataBlock.

print_objects

Prints the names of the DataObject's.

print_transf

Prints the applied transformations for the DataBlock.

read

Internal function for saving.

update_obj

Updates the DataObject instance according to the passed data (e.g., changing its domain or type)

update_position_indices

Updates the position and position_index attributes of the DataObject's.

write

Internal function for writing.