Skip to content

Interactive MicroSims

This textbook includes 18 interactive MicroSims designed to enhance your understanding of machine learning concepts through visualization and hands-on exploration.

What are MicroSims?

MicroSims are lightweight, browser-based interactive simulations that allow you to:

  • Visualize complex algorithms and mathematical concepts
  • Experiment with parameters and observe real-time changes
  • Explore different scenarios and edge cases
  • Understand abstract concepts through concrete examples

All MicroSims run directly in your browser with no installation required.


MicroSims by Chapter

Chapter 2: K-Nearest Neighbors

Chapter 3: Decision Trees

Chapter 4: Logistic Regression

Chapter 5: Regularization

Chapter 6: Support Vector Machines

Chapter 8: Data Preprocessing

Chapter 9: Neural Networks

Chapter 10: Convolutional Neural Networks

Chapter 11: Transfer Learning

Chapter 12: Model Evaluation


Using MicroSims

Each MicroSim includes:

  • Interactive controls - Sliders, buttons, and dropdowns to adjust parameters
  • Real-time visualization - See changes immediately as you adjust controls
  • Educational context - Descriptions and learning objectives
  • Lesson plans - Suggested activities and discussion questions

How to Use

  1. Read the description - Understand what the MicroSim demonstrates
  2. Experiment with controls - Try different parameter values
  3. Observe the changes - See how the visualization responds
  4. Reflect on patterns - Think about what you're observing
  5. Apply your learning - Connect concepts to chapter content

Technical Details

All MicroSims are built using:

  • p5.js - For interactive visualizations and animations
  • Chart.js - For data charts and plots
  • vis-network - For network diagrams

MicroSims are:

  • Width-responsive - Adapt to your screen size
  • Accessible - Work on desktop, tablet, and mobile
  • Open source - View the code and learn from it
  • Embeddable - Can be used in other educational contexts

Embedding MicroSims

Educators can embed MicroSims in their own materials using iframes:

<iframe src="https://your-site.github.io/sims/[microsim-name]/main.html"
        height="800px"
        width="100%"
        scrolling="no">
</iframe>

Replace [microsim-name] with the specific MicroSim directory name.


Feedback

Have suggestions for improving existing MicroSims or ideas for new ones? We welcome your feedback!

Total MicroSims: 18 interactive visualizations