Skip to content

Feature Request: Add a "Mathematical Functions" dataset to Classification mode #252

Description

@nikhil-kumar-tomar

Hi everyone,

I love the playground, but I noticed it's missing a great opportunity to teach students how classification boundaries are actually just approximated mathematical functions.

I’d love to suggest adding a "Mathematical Functions" dataset to the classification panel. The approach fits perfectly into the existing playground code and UI:

  • Blue dots: Any random points generated above a given function line (y > f(x)).
  • Orange dots: Any random points generated below the function line (y < f(x)).

By using raw X and Y coordinates, students could watch the hidden layers take straight lines and miniature linear splits and literally bend them to mimic a curve.

I built a quick proof-of-concept for this in a Google Colab notebook using a Sine Wave as the boundary. You can see how cleanly a simple network approximates the wave here:

https://colab.research.google.com/drive/1lC0-8LdycWm59QfXsh-pySWyFz2mnwoV?usp=sharing

While my notebook shows a sine wave, this dataset idea could easily be generalized to a bunch of other classic functions, like a Cubic function (y = x^3 - x) or a V-shape (y = |x|) to show how networks handle sharp bends.

I think this would be a massive educational upgrade for bridging algebra with neural networks. Let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions