Code Monkey home page Code Monkey logo

us-state-under-over-fitting's Introduction

A Visual Look at Under and Overfitting using U.S. States

A visual example of the concepts of under and overfitting in supervised machine learning using U.S. state border data provided by the U.S. Census Bureau.

License

What's Inside?

This repository contains a jupyter notebook and D3 visualization that showcases visual examples of the concepts of under and overfitting. In the notebook, data is processed, models are fit, and decision surfaces visualized, as shown below. notebook_surface

The D3 visualization can be used to explore decision surfaces generated in the notebook interactively. On the left are toggles for different views, and on the right selections for models and their respective decision surfaces.

visualization_surface

This repository and its contents serve as a learning exercise on the effects of under and overfit models' generalizability to new data - using U.S. states helps because the appropriate geographic shapes are familiar to many.

How To

From this repository's root directory, do the following to start the notebook:

cd notebooks
jupyter notebook

Click Under and Overfitting by Example - 48 U.S. Contiguous States.ipynb.

To start the D3 visualization, the following will work using Python 3:

cd visualization
python3 -m http.server

Go to localhost:8000 in your browser. The initial load may take a few seconds while the data is processed - a map will appear when ready. Use the toggle switches in the top left to alter views and the selections in the top right to select between models.

Future Work

The d3 visualization can be a little slow to render depending on the browser and available resources. This can likely be addressed with a thorough refactor.

License

This project is licensed under the MIT license.

Contributors

Acknowledgements

us-state-under-over-fitting's People

Contributors

vc1492a avatar

Stargazers

 avatar

Watchers

 avatar

us-state-under-over-fitting's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.