From 9e4efd226e2b96f63abdeb743e85f69207b067d1 Mon Sep 17 00:00:00 2001 From: amir_masoud Date: Sun, 19 Jun 2022 00:39:06 +0430 Subject: [PATCH] FIx typo in readme --- 1_ETL Pipeline.ipynb => 1_ETL_Pipeline.ipynb | 0 README.md | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) rename 1_ETL Pipeline.ipynb => 1_ETL_Pipeline.ipynb (100%) diff --git a/1_ETL Pipeline.ipynb b/1_ETL_Pipeline.ipynb similarity index 100% rename from 1_ETL Pipeline.ipynb rename to 1_ETL_Pipeline.ipynb diff --git a/README.md b/README.md index 9ae6030..ded6927 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ ## Project Overview -Machine learning is critical to helping different organizations understand which messages are relevant to them and which messages to prioritize. During these disasters is when they have the least capacity to filter out messages that matter, and find basic methods such as using key word searches to provide trivial results. +Machine learning is critical to helping different organizations understand which messages are relevant to them and which messages to prioritize. During these disasters, ML models have at least the capacity to filter out messages that are important and find basic methods such as using keyword searches to provide trivial results. -In this project, I will analyze thousands of real messages provided by Figure 8, sent during natural disasters either via social media or directly to disaster response organizations. We'll build an ETL pipeline that processes message and category data from .csv files and load them into a SQLite database, which our machine learning and NLP pipelines will then read from to create and save a multi-output supervised learning model. The project will also include a Flask-based web app integrated with Plotly Dashboards. It extracts data from this database to provide data visualizations and uses the trained model to classify new messages for 36 categories (Multi-Label Classification problem). An emergency worker can input a new message and get classification results in several categories. The web app will also display visualizations of the data. +In this project, I will analyze thousands of real messages provided by Figure 8, sent during natural disasters either via social media or directly to disaster response organizations. We'll build an ETL pipeline that processes message and category data from .csv files and load them into an SQLite database, which our machine learning and NLP pipelines will then read from to create and save a multi-output supervised learning model. The project will also include a Flask-based web app integrated with Plotly Dashboards. It extracts data from this database to provide data visualizations and uses the trained model to classify new messages for 36 categories (Multi-Label Classification problem). An emergency worker can input a new message and get classification results in several categories. The web app will also display visualizations of the data. ## Preparing the environment @@ -27,7 +27,7 @@ cd disaster-response-app At this point your command line should look something like: `(disaster_env) :disaster-response-app $`. The `(disaster_env)` indicates that your environment has been activated, and you can proceed with further package installations. -6. Before you can experiment with the code, you'll have to make sure that you have all the libraries and dependencies required to support this project. You will mainly need Python3.7+, PyTorch and its torchvision, OpenCV, Matplotlib. You can install dependencies using: +6. Before you can experiment with the code, you'll have to make sure that you have all the libraries and dependencies required to support this project. You will mainly need Python 3.7+, Flask, Sklearn, and Plotly. You can install dependencies using: ``` pip install -r requirements.txt ``` @@ -50,12 +50,12 @@ The project contains the following files, * [1_ETL_Pipeline Notebook](1_ETL_Pipeline.ipynb): Notebook experiment for the ETL pipelines * [2_ML_Pipeline Notebook](2_ML_Pipeline.ipynb): Notebook experiment for creating and evaluating the Machine Learning and NLP pipelines. -* [process_data.py](app/process_data.py): The ETL pipeline used to process data in preparation for model building. -* [train_classifier.py](app/train_classifier.py): The Machine Learning pipeline used to fit, tune, evaluate, and export the model to a Python pickle (pickle is not uploaded to the repo due to size constraints on Github). -* __app__ directory: Flask application folder. `run.py` starts the python server for the web app and prepare visualizations. +* [process_data.py](app/process_data.py): The ETL pipeline is used to process data in preparation for model building. +* [train_classifier.py](app/train_classifier.py): The Machine Learning pipeline is used to fit, tune, evaluate, and export the model to a Python pickle (pickle is not uploaded to the repo due to size constraints on Github). +* __app__ directory: Flask application folder. `run.py` starts the python server for the web app and prepares visualizations. -## Usage: +## Usage 1. Change directory to `app` directory and run the following commands to set up your database and model. @@ -65,7 +65,7 @@ The project contains the following files, python ./process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisasterResponse.db ``` -* To run ML pipeline that trains classifier and saves the model: +* To run the ML pipeline that trains the classifier and saves the model: ```shell python ./train_classifier.py data/DisasterResponse.db models/classifier_me.pkl @@ -84,12 +84,12 @@ Below is the performance metric for different categories of messages: ![Example](assets/performance.png) -and the model achieved a f1-score of 0.94 in average over all categories. +and the model achieved an f1-score of 0.94 on average over all the categories. ### Examples Here are some examples of message classification: -Type in: `We have a lot of problem at Delma 75 Avenue Albert Jode, those people need water and food.` +Type in: `We have a lot of problems at Delma 75 Avenue Albert Jode, those people need water and food.` in the text box and click `Classify Message`. ![Example](assets/Example_2.png)