HedTypeFactors

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

Holds index of positions for a variable type for one tabular file.

Methods

hed.tools.analysis.hed_type_factors.HedTypeFactors.__init__(...)

Constructor for HedTypeFactors.

hed.tools.analysis.hed_type_factors.HedTypeFactors.get_factors([...])

Return a DataFrame of factor vectors for this type factor.

hed.tools.analysis.hed_type_factors.HedTypeFactors.get_summary()

Attributes

hed.tools.analysis.hed_type_factors.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]
HedTypeFactors.ALLOWED_ENCODINGS = ('categorical', 'one-hot')