Exemplo n.º 1
0
def cython_natural_lds_estep_general(natparam, node_params):
    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)
    return lognorm, expected_stats
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
def cython_natural_lds_estep_general(natparam, node_params):
    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)
    return lognorm, expected_stats