Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ghousiya47 authored Feb 19, 2024
1 parent 6358b37 commit 1e0f04f
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion Sentiment Analysis for Restaurant Reviews (NLP) /README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,60 @@ Customer reviews tells us about the reviews given by the customers for a food in

### Visualization and EDA of different attributes:

<img alt="Distribution" src="./Images/distribution plot 1.png">
<img alt="length_of_review" src="./Images/Number_of_characters_in_each_review.png">

<img alt="barchart" src="./Images/barchart.png">

<img alt="piechart" src="./Images/piechart.png">

**Positive Review WordCloud**

<img alt="wordcloud" src="./Images/wordcloud_positive.png">

**Negative Review WordCloud**

<img alt="wordcloud" src="./Images/negative_wordcloud.png">

**MODELS USED**

| Model | accuracy_train(%) | precision_train(%) | accuracy_test(%) | precision_test(%) |
|---------------------------|-------------------|--------------------|-------------------|---------------------|
|SVM |97.57 |94.25 |92.86 |85.5 |
|Logistic Regression |93.51 |90.38 |88.66 |87.0 |
|Random Forest |91.84 |80.88 |87.18 |78.5 |
|Decision Tree |99.22 |97.50 |79.09 |81.5 |
|Guassian Naive Bayes |69.61 |77.88 |68.61 |75.0 |


**WHAT I HAD DONE**

* Load the dataset which is CSV format.
* It has 1000 entries(Rows), 2 columns.
* Checked for missing values and cleaned the data accordingly.
* Analyzed the data, found insights and visualized them accordingly.
* Found detailed insights of different columns with target variable using plotting libraries.
* Train the datasets by different models and saves their accuracies into a dataframe.


**LIBRARIES NEEDED**

1. Pandas
2. Matplotlib
3. Sklearn
4. NumPy
5. nltk
6. Seaborn
7. wordcloud

**CONCLUSION**

- ML Model predicts sentiments are positive or negative too correctly even if negation words such as not, no, nay are present in our review. Generally negation words opposes positive condition, so considering them is important in order to train our model correctly. Hence I didn't remove negation stopwords.
- We got highest testing accuracy using SVM algorithm which is around 93%
- We got good accuracy for other algorithms also


**YOUR NAME**

*Ghousiya Begum*

[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/ghousiya-begum-a9b634258/) [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/ghousiya47)

0 comments on commit 1e0f04f

Please sign in to comment.