Restricted to only install scikit-learn, gensim, and pandas.
The full instructions to this project can be found here.
The Better Business Bureau estimates that each year, 14 million people are exposed to job scams, with $2 billion in direct losses1. Although job scams have been around for a while, fraudulent job postings can be tricky to spot. The dataset provided, contains around 9k job postings, of which 400 are fake.
This project aims to create a classifier to identify whether a job posting is fake or real.
Due to the data imbalance, submissions were ranked by their F1 score and graded accordingly (higher F1 = higher grade). All submissions needed a total runtime no more than 30 minutes.
Cleaned the data with Regex
- Combined 'description', 'title', and, 'requirements' columns.
- Converted the text to lowercase
- Remove punctuation, digits, underscore, single characters, and multiple spaces.
Sent this data to the TfidfVectorizer
- Removed Stopwords
- Transformed text to feature vectors
Implemented AdaBoostClassifier, SVC, SGDClassifer, RandomForestClassifier, and PassiveAggressiveClassifier with both GridSearchCV and RandomizedSearchCV.
For the final model, PassiveAggressiveClassifier outperformed the other classifiers and had matching F1 scores from both tuning algorithms. RandomizedSearchCV was chosen based on its faster runtime.
The finished product outperformed all but one of my peers.
F1: 0.81
Total Runtime: ~ 18 seconds
Due to the restriction in libraries that could be used, the amount of NLP was limited. Installing other packages such as NLTK, could provide some useful methods to help preprocess the data. Also, the data used for this project was very imbalanced. Using techniques like SMOTE to generate more fraudulent job postings may provide better results.
Footnotes
-
Baker , C. Steven. 2021, Job Scams, https://www.bbb.org/content/dam/0734-st-louis/job-scams/JOB%20SCAMS%20STUDY%20v5.pdf. Accessed Jan. 2023. โฉ