Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts

F1-Score rises while Loss keeps increasing

I've recently run into a paradoxical situation while training a network to distinguish between to classes.

I've used cross entropy as my loss of choice. On my training set the loss steadily decreased while the F1-Score improved. On the validation set the loss decreased shortly before increasing and leveling off around ~2, normally a clear sign for overfitting. However the F1-Score on the validation set kept rising and reached ~0.92, with similarly high presicion and recall.

As I never took a closer look at the relation between F1-Score and the cross-entropy loss, I've decided to do a quick simulation and plotted the results. The plots show the cross-entropy in relation to the F1-Score. On the first graph I varied the range in which the misses landed, while hits where always perfect. The graph shows that misses with a _confidence _create higher losses, even at high F1-Scores. In contrast the confidence of hits has a negligible influence on the loss as depicted in the second graph.

It seems likely that my network developed a high confidence in its prediction, only answering **** or 1, which provoked a high loss while still achieving reasonable high accuracy.

 

F1-Score and Cross Entropy with varying Miss Ranges

F1-Score and Cross Entropy with varying Confidence



Weizen Kastenbrot mit Saaten

Weizen Kastenbrot mit Saaten

Ein einfaches Rezept für ein Kastenbrot aus Weizenmehl. Die Zusammensetzung der Saaten kann beliebig angepasst werden.

 

Vorteig:

  • 250g Weizenmehl 550
  • 250g Wasser
  • 60g Anstellgut (TA200)

Saaten:

  • 80g Sonnenblumkerne
  • 40g Leinensamen
  • 40g Haferflocken
  • 160g heißes Wasser (ca. 90° C)

Hauptteig

  • Vorteig
  • Saaten
  • 200g Weizenmehl 550
  • 15g Salz
  • 5g Hefe

Zutaten des Vorteigs gut vermengen und 12 Stunden bei Raumtemperatur gehen lassen

Saaten mischen und mit heißem Wasser übergießen. Mit eine Klarsichtfolie abdecken und ca. 1 Stunde ziehen lassen.

Alle Zutaten des Hauptteigs vermengen und per Hand zu einem weichen, leicht klebrigen Teig kneten.

Teig 90 Minuten gehen lassen und alle 30 Minuten in der Schüssel falten.

Teig auf einer bemehlten Arbeitsfläche formen und direkt in die Kastenform geben.

Für weitere 2 Stunden gehen lassen, bis sich das Volumen des Teigs etwa verdoppelt hat.

Vor dem backen den Brotteig längs einschneiden und gut befeuchten (z.B. mit einer Sprühflasche)

Den Ofen auf 250° C vorheizen und das Brot für 10 Minuten backen. Danach die Temperatur auf 200° C reduzieren und für weitere 35 Minuten backen. Das Brot aus dem Kasten nehmen und für weitere 10 Minuten auf einem Rost backen.

  Weizen Kastenbrot mit Saaten Anschnitt





How to: Create Pixel Night Sky

I've used this method to create the night sky of my Ludum Dare 38 Game. It's an easy way to create the stars of the night sky in few minutes.

Start with two layers, one for the dark sky and one for the stars. The dark sky is just uses a dark, blue color. The star layer contains a mixture of light colors. It is up to you how you create this layer. I painted the layer randomly with 3 colors and used the Smudge Tool to mix them. Make sure the star layer has an alpha layer.

Initial Layers for Pixel Stars

To convert the randomly colored layer into stars the RGB Noise Filter is used, which can be found under Filters → Noise → RGB Noise …. Set up the filter as shown below. The Red, Green and Blue Noise is completely disabled and only the Alpha Noise is applied. If you do not see the Alpha slider of the filter make sure that the layer has an Alpha Channel.

After applying the filter for the first time the result does not look very promising. If you keep applying the filter repeatedly (using the Ctrl+F shortcut) the remaining color will get sparser and sparser. Keep doing this until you are satisfied with the density of the stars. The results should look like the example below.

 

Finished Pixel Star Night


Ludum Dare 38: Little Sky Farm

Play Little Sky Farm

Little Sky Farm

Story

You want to go the final step with your loved one but damn it is expensive. Living on a small floating island there isn't much to earn money with, but you have to find a way before it is too late. Farm the little land you have to rack up the money you need.

Game Mechanics

The worth of objects changes with time. Most objects get more valuable over time, but only to a certain point. Once they exceeded this point the value deteriorates until they are completely worthless.

It is your job to find out how long processes have to run for an optimal outcome.

This requires keen observation and managing your time between different tasks.

Controls

  • WASD and Arrow-Keys: Walk and Jump
  • Spacebar: Use selected tool
  • Mouse: Control build menu
  • 1-8: Change Tool

Tools

  • Hammer: Interact with most objects
  • Wood: Plant trees
  • Wheat: Plant Wheat
  • Other: there might be hidden functionalities

Credits

Third Party Tools/Assets

Sounds/Assets

Little Sky Factory



Weizensauerteigbrot

Weizensauerteigbrot

Brot für das Wochenende musste her. Daher habe ich einen Teig angesetzt und mich von den Mengen am Neujahrsbrot orientiert. Ich habe dem Hauptteig noch etwas Hefe zugesetzt, da ich meinem Sauerteig noch nicht ganz vertraue. Herausgekommen ist ein schönes Brot mit einer großporigen Krume.

Sauerteig

  • 105 g Weizenmehl 550
  • 105 g Wasser (50°C)
  • 7 g Anstellgut (mild geführt)

Autolyseteig

  • 560 g Weizenmehl 550
  • 355 g Wasser (55°C)

Hauptteig

  • Sauerteig
  • Autolyseteig
  • 30 g Weizenmehl 550
  • 16 g Salz
  • 70 g Wasser (30°C)
  • 0,3g Trokenhefe

Den Sauerteig ansetzen und ca. 12 Stunden bei Raumtemperatur reifen lassen.

Autolyseteig gut vermischen und 1 Stunde stehenlassen.

Alle Zutaten von Hand vermischen und 3 Stunden reifen lassen. Die ersten 2 Stunden 3 mal in der Schüssel falten.

Teig auf eine bemehlte Arbeitsfläche geben, in zwei Portionen teilen und schonend lang wirken.

1 Stunde im Gärkorb mit Schluss nach oben garen lassen.

Bei 250° C fallend auf 150° C mit Dampf für 30 Minuten backen.

Weizensauerteigbrot