rsr.rsr.get_comp_cond_sys_prob_multi¶
- rsr.rsr.get_comp_cond_sys_prob_multi(refs_dict_upper, refs_dict_lower, probs, comps_st_cond, row_names, s_fun=None, n_sample=1000000, n_batch=1000000)[source]¶
Estimate P(system state = s | given component states) for multi-state systems by Monte Carlo.
- Parameters:
refs_dict_upper (
Dict[int,Tensor]) – dict of system upper reference state tensors {state: Tensor(n_var, n_state)}.refs_dict_lower (
Dict[int,Tensor]) – dict of system lower reference state tensors {state: Tensor(n_var, n_state)}.probs (
Tensor) – (n_var, n_state) categorical probability tensor.comps_st_cond (
Dict[str,int]) – dict of known component states {name: state_index}.row_names (
Sequence[str]) – list of variable (component) names matching probs rows.s_fun (
callable) – function(comps_dict) -> tuple(_, sys_state, _).n_sample (
int) – number of samples total and per batch.n_batch (
int) – number of samples total and per batch.
- Returns:
probability}, summing to 1.0.
- Return type:
Dictionary {state