DataObject

class aixd.data.DataObject(name: str, dim: int, domain: Domain, unit: str | None = None, position: int | None = None, position_index: int | None = None, transformations: List[str] | List[DataObjectTransform] | None = None, type: str = 'any', dtype: str | None = None, flag_split_perdim: bool = False)[source]

Bases: object

Master data object, to define each of the different building blocks that are going to be used to form the design parameters and performance attributes vectors.

Parameters:
  • name (str) – Name of the data object.

  • dim (int) – Dimensionality of the data object, or different columns to perform the split on.

  • domain (Domain, optional) – Domain of the data object.

  • unit (str, optional, default=None) – Unit of the data object (e.g. m, kg. m^2, m/s^2 etc.). Use ^ to indicate powers (e.g. m^2), and _ to indicate subscripts (e.g. m_1).

  • position (int, optional, default=None) – Position of the data object in the vector.

  • position_index (int, optional, default=None) – Index of the data object in the vector.

  • transformations (Union[List[str], List[DataObjectTransform]], optional, default=None) – List of transformations to be applied to the data object.

  • type (str, optional, default=”any”) – Name of the type of data object. Either real, categorical, integer, ordinal or any.

  • dtype (str, optional, default=None) – The dtype of the numpy array that is expected.

  • flag_split_perdim (bool, optional, default=False) – If True, object is split across dimensions in a DataBlock.

Methods

append_transformation

Adds the transformation at the end.

check_data_consistency

Check if the data is consistent with the defined domain.

copy

Returns a copy of the data object.

get_activation_outhead

Returns the activation function for approximating this feature.

get_loss_evaluation

Returns the evaluation loss function for this feature.

get_ml_heads

Returns two ML heads necessary for encoding and decoding the given data object.

get_objective

Returns the loss function for approximating this feature.

grid_samples

Returns grid samples from the domain of the data object.

has_name

Returns if the passed name match with the name of the DataObject.

inverse_transform

Inverse transformation of the data matrix according to specification DataObject.transformations.

plot_distrib

Plots the distribution of the passed data.

prepend_transformation

Adds the transformation at the start.

print_transf_norm

Prints an overview of the defined transformations.

random_samples

Returns random samples from the domain of the data object.

sample_around

Returns samples from the domain of the data object around the given centroid.

transform

Transforms the data matrix according to specification DataObject.transformations.

transform_is_fitted

Check if all transformations are fitted.

update_dobj_types

update_obj

Updates the domain of the data object with the passed data.