Skip to content

Commit

Permalink
typo hunting, add description for xor plot
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertDominguez committed Aug 15, 2024
1 parent efa2441 commit b631a87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def generate_xor_data():
return xs, ys

def plot_xor_data():
"""Plot the XOR data.
"""Plot the XOR data. Class 0 points are shown in red, class 1 points in green.
"""
xs, ys = generate_xor_data()
for x, y in zip(xs, ys):
Expand All @@ -169,7 +169,7 @@ def plot_xor_data():


# %% [markdown]
"""The function of an XOR gate can also be understood as a binary classification problem given a 2D binary inputs $x$ ($x$ \in \{0,1\}^2$ and we can think about designing a classifier acting as an XOR gate. It turns out that this problem is not solvable by a single perceptron (https://en.wikipedia.org/wiki/Perceptron) because the set of points $\{(0,0), (0,1), (1,0), (1,1)\}$ is not linearly separable.
"""The function of an XOR gate can also be understood as a binary classification problem given a 2D binary inputs $x$ ($x \in \{0,1\}^2$ and we can think about designing a classifier acting as an XOR gate. It turns out that this problem is not solvable by a single perceptron (https://en.wikipedia.org/wiki/Perceptron) because the set of points $\{(0,0), (0,1), (1,0), (1,1)\}$ is not linearly separable.
![mlp.png](attachments/mlp.png)
Expand Down

0 comments on commit b631a87

Please sign in to comment.