ash_model.utils.profiles.aggregate_node_profile

ash_model.utils.profiles.aggregate_node_profile(h, node, categorical_aggr='mode', numerical_aggr='mean')[source]

Returns an aggregated profile of a node over all time points. The categorical_aggr parameter specifies the aggregation method for categorical attributes. The numerical_aggr parameter specifies the aggregation method for numerical attributes.

Parameters:
  • h (ASH) – The ASH object

  • node (int) – The node id

  • categorical_aggr (str) – The aggregation method for categorical attributes. Options: “mode”, “first”, “last”

  • numerical_aggr (str) – The aggregation method for numerical attributes. Options: “mean”, “median”, “first”, “last”

Returns:

The aggregated profile of the node

Return type:

NProfile