Coder Social home page Coder Social logo

hasanimran96 / predicting-consumer-purchase-intention-using-twitter-data Goto Github PK

View Code? Open in Web Editor NEW
46.0 3.0 16.0 290.18 MB

Predicting Consumer Purchase intention using Twitter Data

License: MIT License

Jupyter Notebook 91.04% Python 8.96%
final-year-project python3 ipython-notebook machine-learning twitter-sentiment-analysis

predicting-consumer-purchase-intention-using-twitter-data's Introduction

Consumer Intention Prediction

FYP-II

All material related to Final Year Project II will be uploaded here

Project Details:

  1. Scrap twitter tweets data and use twitter search API to build a dataset.
  2. Annotating the data and assigning the class: PI or No PI where PI = purchase intention.
  3. Initial survey of data which invloves looking at the type of tweets, checking for imbalance class, building word clouds and different graphical representations to visual the data.
  4. Use different pre processing techniques on the data to build a corpus.
  5. Apply different machine learing text analytical models on the dataset.
    1. Support Vector Machine
    2. Naive Bayes
    3. Logistic Regression
    4. Decision Tree
    5. Neural Network
  6. Output a list of customers who have shown purchase intention towards the product.
  7. Develop a website to display the summary of our work and allow users to upload their dataset and train and/or test the pre-developed models for evaluation.

Set up dependencies for Project Website:

  1. You must have python(latest version), django, numpy, pandas, nltk, textblob, sklearn, installed on your system.
  2. To install use folloowing syntax given below on commad prompt of Windows, here package-name corespond to django, numpy, pandas, nltk, textblob, sklearn:
    1. pip3 install package-name
  3. Use the following syntax to import textblob corpora: python -m textblob.download_corpora
  4. Open Python terminal on windows command promt and install nltk following library:
    1. import nltk
    2. nltk.download('stopwords')
    3. exit()
  5. All required dependencies are installed now.

How to Run Website:

  1. Clone and download the complete repository and UnZip it.
  2. Using Windows Commmand Prompt(cmd) navigate to folder PurchaseIntention2 in the cloned repository.
  3. Then Type "Scripts\activate" on cmd to activate the virtual environment.
  4. Then Type "cd djangoPIWebsite" on cmd.
  5. Then finally type "python manage.py runserver" to run the server.
  6. On browser type "localhost:8000/"
  7. The Web Site is running now.
  8. To close server press Ctrl + C on cmd to exit the server. To re run type "python manage.py runserver" on cmd.

How to run simple Models File:

  1. change working directory to "CIP\PurchaseIntention2".
  2. Then Type "Scripts\activate" on cmd to activate the virtual environment.
  3. change working directory to "CIP\PurchaseIntention2\djangoWebsite\pages".
  4. open python terminal in cmd by typing "python"
  5. Then type "import ModelTest as mt" on terminal. 5 Then type mt.output_to_results("Annotated4.csv","AnnotatedData2.csv", "TF-IDF", "Naive Bayes","90","80","70")
  6. Output will show prediction results and accuracy score for model tested.

predicting-consumer-purchase-intention-using-twitter-data's People

Contributors

hasanimran96 avatar muhammadammarsaleem avatar saad486 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

predicting-consumer-purchase-intention-using-twitter-data's Issues

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.