Datasets:
Sub-tasks:
multi-class-classification
Languages:
English
Size:
1K<n<10K
Tags:
natural-language-understanding
ideology classification
text classification
natural language processing
License:
EricR401S
commited on
Commit
Β·
5606a6e
1
Parent(s):
69b0908
complete dataset
Browse files- Pill_Ideologies-Post_Titles.py +0 -12
- analysis.ipynb +56 -0
Pill_Ideologies-Post_Titles.py
CHANGED
|
@@ -177,18 +177,6 @@ class SubRedditPosts(datasets.GeneratorBasedBuilder):
|
|
| 177 |
train, test_size=0.20, stratify=train["subreddit"], random_state=42
|
| 178 |
)
|
| 179 |
|
| 180 |
-
if self.config.name != "first_domain":
|
| 181 |
-
return [
|
| 182 |
-
datasets.SplitGenerator(
|
| 183 |
-
name=datasets.Split.TRAIN,
|
| 184 |
-
# These kwargs will be passed to _generate_examples
|
| 185 |
-
gen_kwargs={
|
| 186 |
-
"filepath": data,
|
| 187 |
-
"split": "train",
|
| 188 |
-
},
|
| 189 |
-
)
|
| 190 |
-
]
|
| 191 |
-
|
| 192 |
return [
|
| 193 |
datasets.SplitGenerator(
|
| 194 |
name=datasets.Split.TRAIN,
|
|
|
|
| 177 |
train, test_size=0.20, stratify=train["subreddit"], random_state=42
|
| 178 |
)
|
| 179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
return [
|
| 181 |
datasets.SplitGenerator(
|
| 182 |
name=datasets.Split.TRAIN,
|
analysis.ipynb
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": 1,
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"outputs": [
|
| 8 |
+
{
|
| 9 |
+
"name": "stderr",
|
| 10 |
+
"output_type": "stream",
|
| 11 |
+
"text": [
|
| 12 |
+
"c:\\Users\\ericr\\miniconda3\\envs\\sta663C\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
| 13 |
+
" from .autonotebook import tqdm as notebook_tqdm\n",
|
| 14 |
+
"Downloading builder script: 100%|ββββββββββ| 12.7k/12.7k [00:00<00:00, 12.7MB/s]\n",
|
| 15 |
+
"Generating train split: 100%|ββββββββββ| 5123/5123 [00:00<00:00, 7842.83 examples/s]\n",
|
| 16 |
+
"Generating validation split: 100%|ββββββββββ| 1281/1281 [00:00<00:00, 5880.26 examples/s]\n",
|
| 17 |
+
"Generating test split: 100%|ββββββββββ| 712/712 [00:00<00:00, 7775.46 examples/s]\n"
|
| 18 |
+
]
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
"source": [
|
| 22 |
+
"import datasets\n",
|
| 23 |
+
"\n",
|
| 24 |
+
"test = datasets.load_dataset(\"steamcyclone/Pill_Ideologies-Post_Titles\", trust_remote_code=True)"
|
| 25 |
+
]
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"cell_type": "code",
|
| 29 |
+
"execution_count": null,
|
| 30 |
+
"metadata": {},
|
| 31 |
+
"outputs": [],
|
| 32 |
+
"source": []
|
| 33 |
+
}
|
| 34 |
+
],
|
| 35 |
+
"metadata": {
|
| 36 |
+
"kernelspec": {
|
| 37 |
+
"display_name": "sta663C",
|
| 38 |
+
"language": "python",
|
| 39 |
+
"name": "python3"
|
| 40 |
+
},
|
| 41 |
+
"language_info": {
|
| 42 |
+
"codemirror_mode": {
|
| 43 |
+
"name": "ipython",
|
| 44 |
+
"version": 3
|
| 45 |
+
},
|
| 46 |
+
"file_extension": ".py",
|
| 47 |
+
"mimetype": "text/x-python",
|
| 48 |
+
"name": "python",
|
| 49 |
+
"nbconvert_exporter": "python",
|
| 50 |
+
"pygments_lexer": "ipython3",
|
| 51 |
+
"version": "3.11.7"
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
"nbformat": 4,
|
| 55 |
+
"nbformat_minor": 2
|
| 56 |
+
}
|