DataCategorical

class aixd.data.DataCategorical(name: str, dim: int = 1, domain: Options | None = None, position: int | None = None, position_index: int | None = None, dtype: str | None = None, flag_split_perdim: bool = False, **kwargs)[source]

Bases: DataDiscrete

Categorical data type.

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

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

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

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

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

  • dtype (str, optional) – The dtype of the numpy are of the expected data matrix.

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

Methods

copy

Returns a copy of the data object.

from_options

Class method to for initialization from list of integers

get_activation_outhead

Returns the activation function for approximating this feature.

get_loss_evaluation

Returns the loss function for approximating this feature.

get_ml_heads

Returns a fully-connected head with the appropriate number of in / out channels for encoding / decoding this feature

get_objective

Returns the loss function for approximating this feature.

Inherited Methods

append_transformation

Adds the transformation at the end.

check_data_consistency

Check if the data is consistent with the defined domain.

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.

is_data_transformed

Simple heuristic to determine if the data is transformed.

plot_distrib

Plots the distribution of the passed data as a Barplot.

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.