def cython_natural_lds_sample(natparam, node_params, num_samples=1): init_params, pair_params = natparam forward_messages, _ = cython_natural_filter_forward( init_params, pair_params, node_params) samples = cython_natural_sample_backward(forward_messages, pair_params, num_samples) return samples
def cython_natural_lds_inference_general(natparam, node_params, num_samples=1): init_params, pair_params = natparam forward_messages, lognorm = cython_natural_filter_forward( init_params, pair_params, node_params) expected_stats = cython_natural_smoother_general(forward_messages, pair_params) samples = cython_natural_sample_backward(forward_messages, pair_params, num_samples) return samples, expected_stats, lognorm
def cython_natural_lds_inference_general(natparam, node_params, num_samples=1): init_params, pair_params = natparam forward_messages, lognorm = cython_natural_filter_forward( init_params, pair_params, node_params) expected_stats = cython_natural_smoother_general(forward_messages, pair_params) samples = cython_natural_sample_backward(forward_messages, pair_params, num_samples) return samples, expected_stats, lognorm
def cython_natural_lds_sample(natparam, node_params, num_samples=1): init_params, pair_params = natparam forward_messages, _ = cython_natural_filter_forward(init_params, pair_params, node_params) samples = cython_natural_sample_backward(forward_messages, pair_params, num_samples) return samples