{'fraction_non_alphanumeric': 0.02127659574468085, 'fraction_numerical': 0.006257822277847309, 'mean_word_length': 5.722689075630252, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Layer Dependence as a Measure of Local Dependence

A new measure of local dependence called "layer dependence" is proposed and analysed. Layer dependence measures the dependence between two random variables at different percentiles in their joint distribution. Layer dependence satisfies coherence properties similar to Spearman's correlation, such as lying between -1 and 1, with -1, 0 and 1 corresponding to countermonotonicity, independence and comonotonicity, respectively. Spearman's correlation is a weighted average of layer dependence across all percentiles. Alternate overall dependence measures are arrived by varying the weights. Layer dependence is an important input to copula modeling by extracting the dependence structure from past data and incorporating expert opinion if necessary.