Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 2.31 KB

File metadata and controls

30 lines (25 loc) · 2.31 KB

Activation Functions

Topics

  • Combining threshold with weights to create a single parameter vector including a bias
  • Activation functions
  • Perceptron learning rule, adjusting weights using gradient descent on error function

Resources

Challenges

  • Augment your Perceptron class with the follow additional features:
    • Add a nonlinear activation function (for example, the logistic sigmoid function)
    • Implement fit(X, y): train the weights and threshold using the perceptron learning rule until they converge (change by less than 0.0001 after one epoch)
    • Add a learning rate to control how fast the weights are updated in each iteration
    • Train your Perceptron on small 2-dimensional datasets like the examples from class. Compare the weights it found to your own (plotting makes this comparison really easy).
    • Train your Perceptron on the Iris dataset using one-versus-many encoding of classes (make a dummy boolean feature for each iris class, and then train on only one at a time). Plot the decision boundaries of each trained perceptron along with the iris data itself.