Login
You're viewing the mastodonapp.uk public feed.
  • Jul 4, 2026, 8:44 AM

    Found a fun animation I once made for a course.

    It shows how two classes that are not linearly separable become linearly separable when using a small non-linear layer.

    The task is a generated "two circles" toy dataset. It uses a very small non-linear layer (probably three neurons, cannot remember), a linear projection to 2D (for visualization), and a logistic regression layer for classification.

    The animation shows optimization of random weights to a linearly separable solution.

    #ml #mlp

    Dataset that is not linearly separable (two circles/elipses). An elipse of the red class encloses an elipse of the blue class.
    Animation of the two two circles dataset after non-linear projection. With random weights, the classes are not separable, however certain number of optimization steps they become linearly separable. Also some weird oscillations at some point.
    💬 1🔄 0⭐ 0

Replies

  • Jul 4, 2026, 8:46 AM

    Yes, I know, nowadays Claude will generate a much nicer animation as a Javascript page with controls, etc. But in the stone age we'd use ImageMagick or ffmpeg to concatenate a bunch of matplotlib output images into an animation.

    💬 0🔄 0⭐ 0