set_of_cims module

class set_of_cims.SetOfCims(node_id: str, parents_states_number: List, node_states_number: int, p_combs: numpy.ndarray)

Bases: object

Aggregates all the CIMS of the node identified by the label _node_id.

Parameters
  • node_id – the node label

  • parents_states_number (List) – the cardinalities of the parents

  • node_states_number (int) – the caridinality of the node

  • p_combs (numpy.ndArray) – the p_comb structure bound to this node

_state_residence_time

matrix containing all the state residence time vectors for the node

_transition_matrices

matrix containing all the transition matrices for the node

_actual_cims

the cims of the node

property actual_cims
build_cims(state_res_times: numpy.ndarray, transition_matrices: numpy.ndarray) → None

Build the ConditionalIntensityMatrix objects given the state residence times and transitions matrices. Compute the cim coefficients.The class member _actual_cims will contain the computed cims.

Parameters
  • state_res_times (numpy.ndArray) – the state residence times matrix

  • transition_matrices (numpy.ndArray) – the transition matrices

build_times_and_transitions_structures() → None

Initializes at the correct dimensions the state residence times matrix and the state transition matrices.

filter_cims_with_mask(mask_arr: numpy.ndarray, comb: List) → numpy.ndarray

Filter the cims contained in the array _actual_cims given the boolean mask mask_arr and the index comb.

Parameters
  • mask_arr (numpy.array) – the boolean mask that indicates which parent to consider

  • comb (numpy.array) – the state/s of the filtered parents

Returns

Array of ConditionalIntensityMatrix objects

Return type

numpy.array

get_cims_number()
property p_combs