How to use the tigramite.data_processing._check_symmetric_relations function in tigramite

To help you get started, we’ve selected a few tigramite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jakobrunge / tigramite / tests / test_var_process.py View on Github external
good_params, bad_params, message = bad_parameter_sets
    error_message = message + " should trigger a value error for var_process "+\
                              "parent-neighbour dictionary"
    # Test the good parameter set
    try:
        pp._check_parent_neighbor(good_params)
        covar = pp._get_covariance_matrix(good_params)
        pp._check_symmetric_relations(covar)
    # Ensure no exception is raised
    except:
        pytest.fail("Good parameter set triggers exception incorrectly!")
    # Ensure an exception is raised for a bad parameter set
    with pytest.raises(ValueError):
        pp._check_parent_neighbor(bad_params)
        covar = pp._get_covariance_matrix(bad_params)
        pp._check_symmetric_relations(covar)
        pytest.fail(error_message)
github jakobrunge / tigramite / tests / test_var_process.py View on Github external
def test_bad_parameters(bad_parameter_sets):
    """
    Test that the correct exceptions are raised for bad input connectivity
    dictionaries
    """
    # Unpack the parameter set fixture
    good_params, bad_params, message = bad_parameter_sets
    error_message = message + " should trigger a value error for var_process "+\
                              "parent-neighbour dictionary"
    # Test the good parameter set
    try:
        pp._check_parent_neighbor(good_params)
        covar = pp._get_covariance_matrix(good_params)
        pp._check_symmetric_relations(covar)
    # Ensure no exception is raised
    except:
        pytest.fail("Good parameter set triggers exception incorrectly!")
    # Ensure an exception is raised for a bad parameter set
    with pytest.raises(ValueError):
        pp._check_parent_neighbor(bad_params)
        covar = pp._get_covariance_matrix(bad_params)
        pp._check_symmetric_relations(covar)
        pytest.fail(error_message)