HedType

class HedType(event_manager, name, type_tag='condition-variable')[source]

Methods

hed.tools.analysis.hed_type.HedType.__init__(...)

Create a variable manager for one type-variable for one tabular file.

hed.tools.analysis.hed_type.HedType.get_summary()

hed.tools.analysis.hed_type.HedType.get_type_def_names()

Return the type defs names

hed.tools.analysis.hed_type.HedType.get_type_factors([...])

Create a dataframe with the indicated type tag values as factors.

hed.tools.analysis.hed_type.HedType.get_type_list(...)

Find a list of the given type tag from a HedTag, HedGroup, or HedString.

hed.tools.analysis.hed_type.HedType.get_type_value_factors(...)

Return the HedTypeFactors associated with type_name or None.

hed.tools.analysis.hed_type.HedType.get_type_value_level_info(...)

Return type variable corresponding to type_value.

hed.tools.analysis.hed_type.HedType.get_type_value_names()

Attributes

hed.tools.analysis.hed_type.HedType.total_events

hed.tools.analysis.hed_type.HedType.type_variables

HedType.__init__(event_manager, name, type_tag='condition-variable')[source]

Create a variable manager for one type-variable for one tabular file.

Parameters:
  • event_manager (EventManager) – An event manager for the tabular file.

  • name (str) – Name of the tabular file as a unique identifier.

  • type_tag (str) – Lowercase short form of the tag to be managed.

Raises:

HedFileError

  • On errors such as unmatched onsets or missing definitions.

HedType.get_summary()[source]
HedType.get_type_def_names()[source]

Return the type defs names

HedType.get_type_factors(type_values=None, factor_encoding='one-hot')[source]

Create a dataframe with the indicated type tag values as factors.

Parameters:
  • type_values (list or None) – A list of values of type tags for which to generate factors.

  • factor_encoding (str) – Type of factor encoding (one-hot or categorical).

Returns:

Contains the specified factors associated with this type tag.

Return type:

DataFrame

static HedType.get_type_list(type_tag, item)[source]

Find a list of the given type tag from a HedTag, HedGroup, or HedString.

Parameters:
  • type_tag (str) – a tag whose direct items you wish to remove

  • item (HedTag or HedGroup) – The item from which to extract condition type_variables.

Returns:

List of the items with this type_tag

Return type:

list

HedType.get_type_value_factors(type_value)[source]

Return the HedTypeFactors associated with type_name or None.

Parameters:

type_value (str) – The tag corresponding to the type’s value (such as the name of the condition variable).

Returns:

HedTypeFactors or None

HedType.get_type_value_level_info(type_value)[source]

Return type variable corresponding to type_value.

Parameters:

type_value (str) –

Returns:

HedType.get_type_value_names()[source]
HedType.total_events
HedType.type_variables