Code Monkey home page Code Monkey logo

co544-2023-lab3-interactive-python-dashboards's Introduction

Lab 3: Interactive Python Dashboards

This lab is developed parallel to the CO 544 Machine Learning and Data Mining course at the Department of Computer Engineering, University of Peradeniya, Sri Lanka. The purpose of this lab is to provide hands-on experience in building interactive dashboards using Python to provide a visual representation of complex data in an intuitive and interactive way.

Lab Overview

The lab consists of the following key components:

  1. Dataset: The dataset used in this lab is the Wine Quality Red Dataset, which contains physicochemical and sensory properties of red wine samples, along with their quality rating. The dataset contains 1,599 instances with 11 input features and one output variable (quality), ranging from 0 to 10.
  2. Data Preprocessing: The dataset is preprocessed by removing duplicates, dealing with missing values, and converting the quality rating to a binary classification problem of "good" and "bad" wines based on a threshold value. The preprocessed dataset is then split into training and testing sets.
  3. Machine Learning Model: A logistic regression model is trained on the preprocessed dataset to predict the quality of wine based on the given feature values.
  4. Performance Evaluation: The model is evaluated on the testing set using various performance metrics such as accuracy, precision, recall, F1-score, ROC curve, and AUC.
  5. Dashboard: A dashboard is created using the Python Dash library to visualize the correlation matrix and predict the wine quality with the given feature values.

Getting Started

To run the dashboard locally, follow the steps below:

  1. Clone this repository to your local machine.
  2. Install the required dependencies using the requirements.txt file.
pip install -r requirements.txt
  1. Open the terminal and navigate to the project directory.
  2. Run the Jupyter notebook main.ipynb.
  3. Follow the instructions in the notebook to start the server.
  4. Once the server is running, open your web browser and navigate to the address displayed in the notebook to access the dashboard.

Note: The experiment is done using Jupyter notebook. The main.ipynb file is the file that needs to be run using Jupyter Notebook.

Deploying the Dashboard

To deploy the dashboard on a cloud platform such as Render, follow the instructions provided in the Deploying a Dash Application on Render repository.

alt text

Figure 1. Screenshot of the dashboard developed using Python Dash, displaying the correlation of two selected features and providing predictions for wine quality based on user input.

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.