HedTypeFactors

class HedTypeFactors(type_tag, type_value, number_elements)[source]

Holds index of positions for a variable type for A columnar file.

Methods

HedTypeFactors.__init__(type_tag, ...)

Constructor for HedTypeFactors.

HedTypeFactors.get_factors([factor_encoding])

Return a DataFrame of factor vectors for this type factor.

HedTypeFactors.get_summary()

Return the summary of the type tag value as a dictionary.

Attributes

HedTypeFactors.ALLOWED_ENCODINGS

HedTypeFactors.__init__(type_tag, type_value, number_elements)[source]

Constructor for HedTypeFactors.

Parameters:
  • type_tag (str) – Lowercase string corresponding to a HED tag which has a takes value child.

  • type_value (str) – The value of the type summarized by this class.

  • number_elements (int) – Number of elements in the data column

HedTypeFactors.get_factors(factor_encoding='one-hot')[source]

Return a DataFrame of factor vectors for this type factor.

Parameters:

factor_encoding (str) – Specifies type of factor encoding (one-hot or categorical).

Returns:

DataFrame containing the factor vectors as the columns.

Return type:

DataFrame

HedTypeFactors.get_summary()[source]

Return the summary of the type tag value as a dictionary.

Returns:

Contains the summary.

Return type:

dict

HedTypeFactors.ALLOWED_ENCODINGS = ('categorical', 'one-hot')