<jupyter_start><jupyter_text>Generate the data<jupyter_code>X = 1.0*np.random.randn(100, 2) + 0
anomalies = 2.0*np.random.randn(10, 2) + 4.0
plt.scatter(X[:, 0], X[:, 1], c='b')
plt.scatter(anomalies[:, 0], anomalies[:, 1], c='r');
dataset = np.vstack((X, anomalies));<jupyter_output><empty_output><jupyter_text>The Algorithm<jupyter_code>gd = GaussianDist().fit(dataset)
gd.predict(X[:2, :])
gd.predict(anomalies[:2, :])
gd.predict_proba(X)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21868365180467092, 'fraction_numerical': 0.04246284501061571, 'mean_word_length': 8.44, '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': '148750', 'license': 'MIT', 'n_tokens_mistral': 227, 'n_tokens_neox': 206, 'n_words': 28, 'path': 'examples/Anomaly Detection.ipynb', 'repo_name': 'VIVelev/PyDojo', 'size': '471'}