|
1 | | -#  Project 3: Web APIs & NLP |
| 1 | +# Project 3: Reddit Web Scraping Classification |
2 | 2 |
|
3 | 3 | ### Description |
4 | 4 |
|
5 | | -In week four we've learned about a few different classifiers. In week five we'll learn about webscraping, APIs, and Natural Language Processing (NLP). This project will put those skills to the test. |
| 5 | +Business Use Case: AMA Recruiting specializes in recruitment for technology companies and wants to develop a classification model using Natural Language data from a publicly available forum data source |
6 | 6 |
|
7 | | -For project 3, your goal is two-fold: |
8 | | -1. Using [Pushshift's](https://github.com/pushshift/api) API, you'll collect posts from two subreddits of your choosing. |
9 | | -2. You'll then use NLP to train a classifier on which subreddit a given post came from. This is a binary classification problem. |
| 7 | +They want to use this classification system to find the most relevant threads online to distinguish general “financial” thread questions and threads related to computer science careers to develop targeted ad campaigns for potential hiring candidates |
10 | 8 |
|
11 | 9 |
|
12 | | -#### About the API |
| 10 | +### File Structure |
| 11 | +In the file structure, there exists two folders: data and images. Data contains the output and any intermediary csv's between the various stages of the process. The images folder contains the output images of the Exploratory Data Analysis. |
| 12 | +3 main notebooks are: |
13 | 13 |
|
14 | | -Pushshift's API is fairly straightforward. For example, if I want the posts from [`/r/boardgames`](https://www.reddit.com/r/boardgames), all I have to do is use the following url: https://api.pushshift.io/reddit/search/submission?subreddit=boardgames |
| 14 | +1) project 3 data scraping |
| 15 | +2) project 3 eda (exploratory data analysis) |
| 16 | +3) project 3 modeling |
15 | 17 |
|
16 | | -To help you get started, we have a primer video on how to use the API: https://youtu.be/AcrjEWsMi_E |
| 18 | +### The process of the work: |
17 | 19 |
|
18 | | -**NOTE:** Pushshift now limits you to 100 posts per request (no longer the 500 in the screencast). |
| 20 | +1) Gather Data |
| 21 | +2) Data Cleaning and Processing |
| 22 | +3) Exploratory Data Analysis (EDA) |
| 23 | +4) Building Machine Learning models |
| 24 | +5) Evaluating our Models |
| 25 | +6) Making Conclusions about our Findings |
19 | 26 |
|
20 | | ---- |
| 27 | +### Conclusions: |
21 | 28 |
|
22 | | -### Requirements |
| 29 | +Machine learning Classification is a valid way to distinguish corpus text (using NLP). From our dataset and specific modeling used for binary classification in this context, Logistic regression is a better model for the situation at hand for targeted messaging for CS hiring candidates. |
23 | 30 |
|
24 | | -- Gather and prepare your data using the `requests` library. |
25 | | -- **Create and compare two models**. Any two classifiers at least of your choosing: random forest, logistic regression, KNN, SVM, etc. |
26 | | -- A Jupyter Notebook with your analysis for a peer audience of data scientists. |
27 | | -- An executive summary of your results. |
28 | | -- A short presentation outlining your process and findings for a semi-technical audience. |
29 | | - |
30 | | -**Pro Tip:** You can find a good example executive summary [here](https://www.proposify.biz/blog/executive-summary). |
31 | | - |
32 | | ---- |
33 | | - |
34 | | -### Necessary Deliverables / Submission |
35 | | - |
36 | | -- Code must be in at least one clearly commented Jupyter Notebook. |
37 | | -- A readme/executive summary in markdown. |
38 | | -- You must submit your slide deck as a PDF. |
39 | | -- Materials must be submitted by **9:00 AM (EST) on Monday, November 22**. |
40 | | - |
41 | | ---- |
42 | | - |
43 | | -## Rubric |
44 | | -Your instructors will evaluate your project (for the most part) using the following criteria. You should make sure that you consider and/or follow most if not all of the considerations/recommendations outlined below **while** working through your project. |
45 | | - |
46 | | -For Project 3 the evaluation categories are as follows:<br> |
47 | | -**The Data Science Process** |
48 | | -- Problem Statement |
49 | | -- Data Collection |
50 | | -- Data Cleaning & EDA |
51 | | -- Preprocessing & Modeling |
52 | | -- Evaluation and Conceptual Understanding |
53 | | -- Conclusion and Recommendations |
54 | | - |
55 | | -**Organization and Professionalism** |
56 | | -- Organization |
57 | | -- Visualizations |
58 | | -- Python Syntax and Control Flow |
59 | | -- Presentation |
60 | | - |
61 | | -**Scores will be out of 30 points based on the 10 categories in the rubric.** <br> |
62 | | -*3 points per section*<br> |
63 | | - |
64 | | -| Score | Interpretation | |
65 | | -| --- | --- | |
66 | | -| **0** | *Project fails to meet the minimum requirements for this item.* | |
67 | | -| **1** | *Project meets the minimum requirements for this item, but falls significantly short of portfolio-ready expectations.* | |
68 | | -| **2** | *Project exceeds the minimum requirements for this item, but falls short of portfolio-ready expectations.* | |
69 | | -| **3** | *Project meets or exceeds portfolio-ready expectations; demonstrates a thorough understanding of every outlined consideration.* | |
70 | | - |
71 | | - |
72 | | -### The Data Science Process |
73 | | - |
74 | | -**Problem Statement** |
75 | | -- Is it clear what the goal of the project is? |
76 | | -- What type of model will be developed? |
77 | | -- How will success be evaluated? |
78 | | -- Is the scope of the project appropriate? |
79 | | -- Is it clear who cares about this or why this is important to investigate? |
80 | | -- Does the student consider the audience and the primary and secondary stakeholders? |
81 | | - |
82 | | -**Data Collection** |
83 | | -- Was enough data gathered to generate a significant result? |
84 | | -- Was data collected that was useful and relevant to the project? |
85 | | -- Was data collection and storage optimized through custom functions, pipelines, and/or automation? |
86 | | -- Was thought given to the server receiving the requests such as considering number of requests per second? |
87 | | - |
88 | | -**Data Cleaning and EDA** |
89 | | -- Are missing values imputed/handled appropriately? |
90 | | -- Are distributions examined and described? |
91 | | -- Are outliers identified and addressed? |
92 | | -- Are appropriate summary statistics provided? |
93 | | -- Are steps taken during data cleaning and EDA framed appropriately? |
94 | | -- Does the student address whether or not they are likely to be able to answer their problem statement with the provided data given what they've discovered during EDA? |
95 | | - |
96 | | -**Preprocessing and Modeling** |
97 | | -- Is text data successfully converted to a matrix representation? |
98 | | -- Are methods such as stop words, stemming, and lemmatization explored? |
99 | | -- Does the student properly split and/or sample the data for validation/training purposes? |
100 | | -- Does the student test and evaluate a variety of models to identify a production algorithm (**AT MINIMUM:** two models)? |
101 | | -- Does the student defend their choice of production model relevant to the data at hand and the problem? |
102 | | -- Does the student explain how the model works and evaluate its performance successes/downfalls? |
103 | | - |
104 | | -**Evaluation and Conceptual Understanding** |
105 | | -- Does the student accurately identify and explain the baseline score? |
106 | | -- Does the student select and use metrics relevant to the problem objective? |
107 | | -- Does the student interpret the results of their model for purposes of inference? |
108 | | -- Is domain knowledge demonstrated when interpreting results? |
109 | | -- Does the student provide appropriate interpretation with regards to descriptive and inferential statistics? |
110 | | - |
111 | | -**Conclusion and Recommendations** |
112 | | -- Does the student provide appropriate context to connect individual steps back to the overall project? |
113 | | -- Is it clear how the final recommendations were reached? |
114 | | -- Are the conclusions/recommendations clearly stated? |
115 | | -- Does the conclusion answer the original problem statement? |
116 | | -- Does the student address how findings of this research can be applied for the benefit of stakeholders? |
117 | | -- Are future steps to move the project forward identified? |
118 | | - |
119 | | - |
120 | | -### Organization and Professionalism |
121 | | - |
122 | | -**Project Organization** |
123 | | -- Are modules imported correctly (using appropriate aliases)? |
124 | | -- Are data imported/saved using relative paths? |
125 | | -- Does the README provide a good executive summary of the project? |
126 | | -- Is markdown formatting used appropriately to structure notebooks? |
127 | | -- Are there an appropriate amount of comments to support the code? |
128 | | -- Are files & directories organized correctly? |
129 | | -- Are there unnecessary files included? |
130 | | -- Do files and directories have well-structured, appropriate, consistent names? |
131 | | - |
132 | | -**Visualizations** |
133 | | -- Are sufficient visualizations provided? |
134 | | -- Do plots accurately demonstrate valid relationships? |
135 | | -- Are plots labeled properly? |
136 | | -- Are plots interpreted appropriately? |
137 | | -- Are plots formatted and scaled appropriately for inclusion in a notebook-based technical report? |
138 | | - |
139 | | -**Python Syntax and Control Flow** |
140 | | -- Is care taken to write human readable code? |
141 | | -- Is the code syntactically correct (no runtime errors)? |
142 | | -- Does the code generate desired results (logically correct)? |
143 | | -- Does the code follows general best practices and style guidelines? |
144 | | -- Are Pandas functions used appropriately? |
145 | | -- Are `sklearn` and `NLTK` methods used appropriately? |
146 | | - |
147 | | -**Presentation** |
148 | | -- Is the problem statement clearly presented? |
149 | | -- Does a strong narrative run through the presentation building toward a final conclusion? |
150 | | -- Are the conclusions/recommendations clearly stated? |
151 | | -- Is the level of technicality appropriate for the intended audience? |
152 | | -- Is the student substantially over or under time? |
153 | | -- Does the student appropriately pace their presentation? |
154 | | -- Does the student deliver their message with clarity and volume? |
155 | | -- Are appropriate visualizations generated for the intended audience? |
156 | | -- Are visualizations necessary and useful for supporting conclusions/explaining findings? |
157 | | - |
158 | | - |
159 | | ---- |
160 | | - |
161 | | -### Why did we choose this project for you? |
162 | | -This project covers three of the biggest concepts we cover in the class: Classification Modeling, Natural Language Processing and Data Wrangling/Acquisition. |
163 | | - |
164 | | -Part 1 of the project focuses on **Data wrangling/gathering/acquisition**. This is a very important skill as not all the data you will need will be in clean CSVs or a single table in SQL. There is a good chance that wherever you land you will have to gather some data from some unstructured/semi-structured sources; when possible, requesting information from an API, but sometimes scraping it because they don't have an API (or it's terribly documented). |
165 | | - |
166 | | -Part 2 of the project focuses on **Natural Language Processing** and converting standard text data (like Titles and Comments) into a format that allows us to analyze it and use it in modeling. |
167 | | - |
168 | | -Part 3 of the project focuses on **Classification Modeling**. Given that project 2 was a regression focused problem, we needed to give you a classification focused problem to practice the various models, means of assessment and preprocessing associated with classification. |
0 commit comments