The Twitter bot is a program used to produce automated posts, follow Twitter users, or serve as spam to entice clicks on the Twitter microblogging service. In this project, we will use Machine Learning techniques to predict whether an account on Twitter is a Bot or a real user. We have performed a significant amount of feature engineering, along with feature extraction - selected features out of 20 helped us to identify whether an account is a bot or non-bot. Please see below a sample solution kit to jumpstart your solution on creating a Bias Detector application. To use this kit to build your own solution, scroll down to refer sections Kit Deployment Instructions and Instruction to Run. ⬇️ Download 1-Click Installer
Deployment Information
For Windows OS, Download, extract and double-click kit installer file to install the kit. Note: Do ensure to extract the zip file before running it. The installation may take from 2 to 10 minutes based on bandwidth. 1. When you're prompted during the installation of the kit, press Y to launch the app automatically and run notebook cell by cell, by clicking on a cell and click Run button below the Menu bar. 2. To run the app manually, press N when you're prompted and locate the zip file Twitter-Bot-detection.zip 3. Extract the zip file and navigate to the directory Twitter-Bot-detection 4. Open command prompt in the extracted directory Twitter-Bot-detection and run the command jupyter notebook For other Operating System, 1. Click here to install python 2. Click here to download the repository. 3. Extract the zip file and navigate to the directory Twitter-Bot-detection 4. Open terminal in the extracted directory Twitter-Bot-detection 5. Install dependencies by executing the command pip install -r requirements.txt 6. Run the command jupyter notebook.
Development Environment
VSCode and Jupyter Notebook are used for development and debugging. Jupyter Notebook is a web based interactive environment often used for experiments, whereas VSCode is used to get a typical experience of IDE for developers. Jupyter Notebook is used for our development.
notebookby jupyter
Jupyter Interactive Notebook
notebookby jupyter
Jupyter Notebook 10204 Version:v7.0.0b4 License: Permissive (BSD-3-Clause)
Exploratory Data Analysis
For extensive analysis and exploration of data, and to deal with arrays, these libraries are used. They are also used for performing scientific computation and data manipulation.
pandasby pandas-dev
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
pandasby pandas-dev
Python 38689 Version:v2.0.2 License: Permissive (BSD-3-Clause)
numpyby numpy
The fundamental package for scientific computing with Python.
numpyby numpy
Python 23755 Version:v1.25.0rc1 License: Permissive (BSD-3-Clause)
Data Visualization
The patterns and relationships are identified by representing data visually and below libraries are used for generating visual plots of the data.
matplotlibby matplotlib
matplotlib: plotting with Python
matplotlibby matplotlib
Python 17559 Version:v3.7.1 License: No License
seabornby mwaskom
Statistical data visualization in Python
seabornby mwaskom
Python 10797 Version:v0.12.2 License: Permissive (BSD-3-Clause)
Utilities
Tweepy library helps to integrate our application with Twitter.
Kit Solution Source
Custom classification algorithm to sense the bots vs human on social media space like twitter
MachineLearning-Detecting-Twitter-Botsby jubins
Jupyter Notebook 110 Version:Current License: Permissive (MIT)
Instruction to Run
Follow below instructions to run the solution. 1. Locate and open the Bot-Detection.ipynb notebook from the Jupyter Notebook browser window. 2. Bearer tokens are needed to use the Twitter API. 3. To obtain it, access https://developer.twitter.com/en/apps or click here register your app, and get your API keys (and tokens) 4. Under Generate Bearer Token section, replace your Bearer token in the curl URL at location of Authorization: Bearer < bearer token > For example, Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAbfb3IuBi2%bS323nE%nL 5. Execute cells in the notebook by selecting Cell --> Run All from Menu bar. For your Challenge, 1. You can get recent tweets by modifying the hashtag in curl URL with query=%23< tag >.For e.g query=%23covid 2. Execute cells in the notebook by selecting Cell --> Run All from Menu bar. 3. Output will be stored in a file Output_data.csv in the location Twitter-Bot-detection directory. Output text is in csv format.
Troubleshooting
1. While running batch file, if you encounter Windows protection alert , select More info --> Run anyway 2. During kit installer, if you encounter Windows security alert, click Allow
Support
If you need help to use this kit, you can email us at kandi.support@openweaver.com or direct message us on Twitter Message @OpenWeaverInc.