Skip to content

Commit

Permalink
Use sign function instead of heaviside step for activation function
Browse files Browse the repository at this point in the history
  • Loading branch information
gbroques committed Apr 26, 2018
1 parent cafa4a4 commit 0c84f19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions data.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
3 5
1 1 1 0
1 1 0 1
0 0 1 1
1 1 0 0
1 0 0 1
1 1 1 -1
1 1 -1 1
-1 -1 1 1
1 1 -1 -1
1 -1 -1 1
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def main():
design_matrix = data[:, :num_features]
target_values = data[:, -1]

perceptron = Perceptron(max_iter=100, learning_rate=0.2)
perceptron = Perceptron(max_iter=100, learning_rate=0.2, activation_function='sign')
perceptron.fit(design_matrix, target_values)

wait_for_test_example(perceptron, num_features)
Expand Down

0 comments on commit 0c84f19

Please sign in to comment.