<jupyter_start><jupyter_text>Load the dataset<jupyter_code>X, y = make_circles(n_samples=1_000, noise=0.2, factor=0.1)

assert len(X) == len(y)<jupyter_output><empty_output><jupyter_text>Quick EDA<jupyter_code>plt.scatter(X[y==0, 0], X[y==0, 1], c="r")
plt.scatter(X[y==1, 0], X[y==1, 1], c="b")

plt.grid()
plt.show();<jupyter_output><empty_output><jupyter_text>Build the Neural Network<jupyter_code>M, N_INPUTS = X.shape
model = NeuralNetwork(optimizer=Adam(alpha=0.03), n_epochs=3_000, batch_size=256)

model.add(Dense(8, n_inputs=N_INPUTS, activation="relu"))
model.add(Dense(6, activation="relu"))
model.add(Dropout(0.8))
model.add(Dense(2, activation="softmax"))<jupyter_output><empty_output><jupyter_text>Training<jupyter_code>model.fit(X, y)
model.summary()<jupyter_output>+---------------+
| Model Summary |
+---------------+
Input Shape: (2, 1)
+------------+----------------------+--------------+
| Layer Type | Number of Parameters | Output Shape |
+------------+----------------------+--------------+
| Dense      | 24                   | (8, 1)       |
| Dense      | 54                   | (6, 1)       |
| Dropout    | 0                    | (6, 1)       |
| Dense      | 14                   | (2, 1)       |
+------------+----------------------+--------------+
Total Number of Parameters: 92<jupyter_text>Learning Curve<jupyter_code>plt.plot(model._loss_values[::10]);<jupyter_output><empty_output><jupyter_text>Evaluate<jupyter_code>model.evaluate(X, y)
plot_decision_boundary(model, X, y)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2672301690507152, 'fraction_numerical': 0.033810143042912875, 'mean_word_length': 2.664285714285714, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '605518', 'license': 'MIT', 'n_tokens_mistral': 607, 'n_tokens_neox': 554, 'n_words': 80, 'path': 'examples/Neural Network-Dropout.ipynb', 'repo_name': 'VIVelev/PyDojo', 'size': '1538'}