Vera-ZWY commited on
Commit
18e216c
·
verified ·
1 Parent(s): e7d73d8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +153 -0
README.md CHANGED
@@ -169,3 +169,156 @@ configs:
169
  - split: train
170
  path: data/train-*
171
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  - split: train
170
  path: data/train-*
171
  ---
172
+ # README: Dataset Cleanup and Processing Journal
173
+
174
+ ### Dataset Source
175
+ - **Original Source**: [MuscariMedia/reddittest113024](https://huggingface.co/datasets/MuscariMedia/reddittest113024)
176
+ - **Dataset Details**: Contains 12,000 Reddit posts.
177
+
178
+ ### Samplyling
179
+ 1. **Challenges Identified**
180
+ Uneven Data Distribution:
181
+
182
+ - Months: October and November have similar data amounts, but December has much less.
183
+ - Weeks: Significant differences between weeks (e.g., Weeks 42-48 have much more data than Weeks 41, 49, and 50).
184
+ - Weekdays vs. Weekends: Weekdays have more data than weekends. Hours: Peaks during certain hours (10 AM - 1 PM, smaller peak 5 PM - 7 PM).
185
+ - Non-Numerical Data: Aggregation methods like mean or sum are not applicable.
186
+ - Score Interpretation: The score distribution is highly skewed to the right (positive skewness). A small number of titles have very high scores, while the majority have low scores. Median (15) is much lower than the mean (~1,142.78), indicating that most scores are below the mean.
187
+
188
+ 2. **Sampling Strategy**
189
+ We are gonna use multi-stage stratified sampling approach with proportional allocation, combined with oversampling in underrepresented strata. This method involves:
190
+
191
+ a. Stratification Levels:
192
+ - Level 1: Months (October, November, December)
193
+ - Level 2: Weeks within each month
194
+ - Level 3: Weekdays vs. Weekends
195
+ - Level 4: Hourly intervals
196
+ b. Alternative Sampling Strategy
197
+ - To balance the focus on high-scoring titles while maintaining representativeness, consider the following modified approach:
198
+ Stratified Sampling with Score-Based Selection
199
+ - Method:
200
+ Within each stratum, sort the data by score in descending order.
201
+ Select the top `n` titles based on score and randomly sample additional titles.
202
+
203
+ 3. **Potential Biases and Risks**:
204
+ - Selection Bias: Overrepresentation of high scores, underrepresentation of diversity.
205
+ - Temporal Bias: Skewed comparisons across time periods.
206
+
207
+ ### Cleanup and Encoding Tasks
208
+ 1. **Title Text Cleanup**:
209
+ - Corrected spelling errors in post titles (e.g., "Presidential Eelction" → "Presidential Election").
210
+ - Removed artifacts and symbols appearing in text strings.
211
+ - Reformatted text for readability using proper quotation marks.
212
+
213
+ 2. **Ecode True/False string**
214
+ For columns:
215
+ ```
216
+ is_crosspostable
217
+ can_gild
218
+ author_patreon_flair
219
+ is_video
220
+ stickied
221
+ is_original_content
222
+ is_self
223
+ pinned
224
+ no_follow
225
+ can_mod_post
226
+ spoiler
227
+ allow_live_comments
228
+ archived
229
+ is_reddit_media_domain
230
+ author_premium
231
+ locked
232
+ media_only
233
+ is_created_from_ads_ui
234
+ ```
235
+
236
+ 3. **Encode b'True/False' formate**:
237
+ Handles cases like b'True', b"b'False'", b'true' etc.
238
+ For columns
239
+ ```
240
+ over_18
241
+ is_meta
242
+ is_robot_indexable
243
+ quarantine
244
+ send_replies
245
+ hide_score
246
+ contest_mode
247
+ ```
248
+ 4. **Encode b'int' formate**:
249
+ For columns:
250
+ ```
251
+ thumbnail_width
252
+ num_comments
253
+ pwls
254
+ ```
255
+
256
+ 5. **permalink**:
257
+ The extra backslashes (\) you're seeing in fields like **permalink**, **thumbnail**, and **url** are escape characters that appear in the JSON representation of the data.
258
+ This is a common source of confusion when dealing with JSON strings that contain special characters like forward slashes (/).
259
+
260
+ The backslashes are not part of the actual string content; they are just there to ensure that the JSON is correctly formatted and can be parsed without errors.
261
+ For better tracking the link, I added the ```"https://www.reddit.com"``` at the front of the **"permalink"**.
262
+
263
+
264
+ ### Relevance Analysis
265
+ - **Model**: `gpt-4o-mini`
266
+ - **Task**: Evaluated the relevance of post titles to the US presidential elections.
267
+ - Added a new column `us_presidential_election`:
268
+ - `1`: Title related to US presidential elections.
269
+ - `0`: Title not related.
270
+
271
+ ### Topic Classification
272
+ - **Model**: `gpt-4o-mini`
273
+ - Added a `topics` column:
274
+ - Value format: Comma-separated list of topics (e.g., `"economy, democracy"`).
275
+ - **Possible topics**:
276
+ ```
277
+ 'LGBTQ',
278
+ 'Social Security',
279
+ 'abortion',
280
+ 'age',
281
+ 'child care',
282
+ 'climate change',
283
+ 'conspiracy',
284
+ 'crime',
285
+ 'democracy',
286
+ 'discrimination',
287
+ 'disinformation',
288
+ 'drug policy',
289
+ 'economy',
290
+ 'education',
291
+ 'election',
292
+ 'environment',
293
+ 'equity',
294
+ 'ethics',
295
+ 'foreign relations',
296
+ 'freedom of speech',
297
+ 'gender',
298
+ 'health',
299
+ 'human rights',
300
+ 'immigrant',
301
+ 'justice',
302
+ 'media',
303
+ 'opportunity',
304
+ 'political parties',
305
+ 'race',
306
+ 'religion',
307
+ 'veterans',
308
+ 'violence',
309
+ 'voting rights',
310
+ 'youth'
311
+ ```
312
+
313
+ ### Dataset Restructuring
314
+ - Converted the dataset into **JSON format** with the following structure:
315
+ - **Post_Metadata**:
316
+ - `id`, `permalink`, `removed_by_category`, `created_est`, `subreddit_subscribers`, `suggested_sort`, `is_robot_indexable`
317
+ - **Author_Data**:
318
+ - `author`, `author_full_name`, `upvote_ratio`, `author_flair_text`
319
+ - **Post_Info**:
320
+ - `title`, `url`, `domain`, `thumbnail`, `over_18`, `send_replies`, `is_original_content`
321
+ - **Sharing_Info**:
322
+ - `score`, `upvote_ratio`, `num_comments`, `num_crossposts`
323
+ - **Additional Fields**:
324
+ - `us_presidential_election`, `topics`