abjer / isds2020

Introduction to Social Data Science 2020 - a summer school course abjer.github.io/isds2020
58 stars 92 forks source link

Assertion error in assignment 2 ex 11.1.6 #40

Closed jesperhauch closed 4 years ago

jesperhauch commented 4 years ago

Hi

I'm getting an assertion error in ex 11.1.6 in assignment 2. It seems my weights do not update correctly.

I'm creating the update_weight function in 11.1.5 image And then running 50 iterations in 11.1.6 image

As you see, this is nowhere near the array given in the assertion cell. The assignment says that the update_weight function should take perceptronEpoch, but I can't make any sense of that?

jsr-p commented 4 years ago

Hi @jesperhauch , remember the + sign when updating the weights in your update_weight function after the equal sign, i.e. +=.

Ignore the last part of the exercise task where it says "and take the name perceptronEpoch". That was just put into the assignment to see if you are awake and get some more activity in this forum :)

jesperhauch commented 4 years ago

That did the trick.

Haha fingers crossed ;)