<jupyter_start><jupyter_text>Entropy<jupyter_code>import math<jupyter_output><empty_output><jupyter_text>$E(S) = \sum -p_i \log_2{p_i}$<jupyter_code>def entropy(p1, p2):
    return -p1 * math.log(p1, 2) - p2 * math.log(p2, 2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17254901960784313, 'fraction_numerical': 0.03529411764705882, 'mean_word_length': 7.827586206896552, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '127173', 'license': 'MIT', 'n_tokens_mistral': 128, 'n_tokens_neox': 123, 'n_words': 14, 'path': '001_.ipynb', 'repo_name': 'tigerarcades/nd-datascience-decision_trees-exercises', 'size': '255'}