Giter Site home page Giter Site logo

alphadi / dash-regression Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evageiger/dash-regression

0.0 1.0 0.0 1013 KB

Interactive Linear Regression Explorer, using Dash + scikit-learn

Home Page: https://dash-regression.herokuapp.com/

License: MIT License

Python 62.31% CSS 37.69%

dash-regression's Introduction

Regression Explorer

This is a demo of 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 different linear regression models. Read more about Linear Models here.

The Select Dataset dropdown lets you select different toy datasets with added noise. To add custom data, select the "Custom Data" option from the drodpwon and start clicking on the graph to add them. You can also choose to add training data, test data, or remove points using the Click Mode dropdown.

The Select Model dropdown lets you select different types of models. Linear Regression is the regular Least Square model, whereas the other ones are regularized models.

The Polynomial Degree slider lets you control how many polynomial degree do you want to use to fit your data. This will create a non-linear regression, at the risk of overfitting.

The Alpha Slider lets you control the regularization term, which penalizes large coefficient terms. This lets you control the variance and bias of your model.

L1/L2 ratio is for the Elastic Net model, and control the weight of each norm.

Running the app locally

First create a virtual environment with conda or venv inside a temp folder, then activate it.

virtualenv dash-regression-venv

# Windows
dash-regression-venv\Scripts\activate
# Or Linux
source venv/bin/activate

Clone the git repo, then install the requirements with pip

git clone https://github.com/plotly/dash-regression.git
cd dash-regression
pip install -r requirements.txt

Run the app

python 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 or numpy functions, which then generates a model with respect to the parameters you changed. The model is then used to perform predictions that are displayed as a line plot. The combination of those two library lets you quickly write high-level, concise code.

Built With

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

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Xing Han Lu - Initial Work - @xhlulu

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

License

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

Acknowledgments

Screenshots

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.