[closed] Another bug in a twiddle

0
1

There is another (than Bug in the twiddle) bug in the twiddle - the values are not updated even if better are found. Why?

Because old error has a handicap of K factor in the if below:

        print float(err) / float(k+1)
        if err < best_error:
            best_error = float(err) / float(k+1)

I've replaced this with:

        err /= float(K)
        print err

        if err < best_error:
            best_error = err

in lines 625-627, 640-642, and it seems to work fine (the values are updated).

asked 26 Mar '12, 08:55

Jakub%20Mateusz%20Kowalski's gravatar image

Jakub Mateus...
88231724
accept rate: 7%

closed 26 Mar '12, 08:58

The question has been closed for the following reason "Duplicate Question" by Jakub Mateusz Kowalski 26 Mar '12, 08:58


One Answer:
link

answered 26 Mar '12, 08:57

Jakub%20Mateusz%20Kowalski's gravatar image

Jakub Mateus...
88231724

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5,185
×2,215
×1,705
×323
×41
×23

Asked: 26 Mar '12, 08:55

Seen: 345 times

Last updated: 26 Mar '12, 08:58