Skip to content

fastforwardlabs/dash_svm_demo

Repository files navigation

Support Vector Machine (SVM) Explorer GitHub license Mentioned in Awesome Machine Learning

This is a learning tool and exploration app made using the Dash interactive Python framework developed by Plotly.

Dash abstracts away all of the technologies and protocols required to build an interactive web-based application and is a simple and effective way to bind a user interface around your Python code. To learn more check out our documentation.

Try out the demo app here.

animated1

Getting Started

Using the demo

This demo lets you interactive explore Support Vector Machine (SVM).

It includes a few artificially generated datasets that you can choose from the dropdown, and that you can modify by changing the sample size and the noise level of those datasets.

The other dropdowns and sliders lets you change the parameters of your classifier, such that it could increase or decrease its accuracy.

Running the app on CDSW

From workbench:

  • Open up 00_launch_app.py
  • Run all code

From the console:

python3 app.py

About the app

How does it work?

This app is fully written in Dash + scikit-learn. All the components are used as input parameters for scikit-learn functions, which then generates a model with respect to the parameters you changed. The model is then used to perform predictions that are displayed on a contour plot, and its predictions are evaluated to create the ROC curve and confusion matrix.

In addition to creating models, scikit-learn is used to generate the datasets you see, as well as the data needed for the metrics plots.

What is an SVM?

An SVM is a popular Machine Learning model used in many different fields. You can find an excellent guide to how to use SVMs here.

Built With

  • Dash - Main server and interactive components
  • Plotly Python - Used to create the interactive plots
  • Scikit-Learn - Run the classification algorithms and generate datasets

Authors

See also the list of contributors who participated in this project.

adaptation for CDSW / CML : * Matthieu Lamairesse

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

The heatmap configuration is heavily inspired from the scikit-learn Classification Comparison Tutorial. Please go take a look!

The idea of the ROC Curve, the Matrix Pie Chart and Thresholding came from @nickruchten. The app would not have been as complete without his insightful advice.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published