Skip to content

Commit

Permalink
FIx typo in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iamirmasoud committed Jun 18, 2022
1 parent 7063477 commit 9e4efd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
File renamed without changes.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +27,7 @@ cd disaster-response-app

At this point your command line should look something like: `(disaster_env) <User>:disaster-response-app <user>$`. 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
```
Expand All @@ -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.

Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 9e4efd2

Please sign in to comment.