Dcolinmorgan commited on
Commit
9273f47
·
verified ·
1 Parent(s): 9bb23e1

based on melisekm/natural-disasters-from-social-media

Browse files

based on "melisekm/natural-disasters-from-social-media"
labels made by featurizing via `cu_cat` and taking first 2 pc via `k-means`
```
from cu_cat._dep_manager import deps
deps.cuml=None
AA = TableVectorizer().fit_transform(dataset['train']['label'])
pca = PCA(2)
pca_data = pd.DataFrame(pca.fit_transform(AA),columns=['PC1','PC2'])
kmeans =KMeans(n_clusters=2).fit(AA)
pca_data['cluster'] = pd.Categorical(kmeans.labels_)
fig,ax = plt.subplots()
scatter = ax.scatter(pca_data['PC1'], pca_data['PC2'],c=pca_data['cluster'],cmap='Set3',alpha=0.7)
legend1 = ax.legend(*scatter.legend_elements(),
loc="upper left", title="")
ax.add_artist(legend1)
plt.savefig('test')

dataset = dataset.map(lambda examples: {'label': TableVectorizer().fit_transform(examples['label'])}, batched=True)
dataset = dataset.map(lambda examples: {'label': KMeans(n_clusters=2).fit(examples['label']).labels_}, batched=True)
```

dataset_dict.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"splits": ["train", "validation", "test"]}
test/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de42054cef17133b864151558242edf7ee1d8f700cdcd63e8f587099a4cb3470
3
+ size 4932392
test/dataset_info.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "csv",
3
+ "citation": "",
4
+ "config_name": "default",
5
+ "dataset_name": "natural-disasters-from-social-media",
6
+ "dataset_size": 52932817,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/train.csv": {
10
+ "num_bytes": 39817704,
11
+ "checksum": null
12
+ },
13
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/validation.csv": {
14
+ "num_bytes": 4977163,
15
+ "checksum": null
16
+ },
17
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/test.csv": {
18
+ "num_bytes": 4981112,
19
+ "checksum": null
20
+ }
21
+ },
22
+ "download_size": 49775979,
23
+ "features": {
24
+ "text": {
25
+ "dtype": "string",
26
+ "_type": "Value"
27
+ },
28
+ "target": {
29
+ "dtype": "int64",
30
+ "_type": "Value"
31
+ },
32
+ "SOURCE_FILE": {
33
+ "dtype": "string",
34
+ "_type": "Value"
35
+ },
36
+ "tweet_id": {
37
+ "dtype": "float64",
38
+ "_type": "Value"
39
+ },
40
+ "filename": {
41
+ "dtype": "string",
42
+ "_type": "Value"
43
+ },
44
+ "event_type": {
45
+ "dtype": "string",
46
+ "_type": "Value"
47
+ },
48
+ "event_type_detail": {
49
+ "dtype": "string",
50
+ "_type": "Value"
51
+ },
52
+ "label": {
53
+ "dtype": "int32",
54
+ "_type": "Value"
55
+ }
56
+ },
57
+ "homepage": "",
58
+ "license": "",
59
+ "size_in_bytes": 102708796,
60
+ "splits": {
61
+ "train": {
62
+ "name": "train",
63
+ "num_bytes": 42341997,
64
+ "num_examples": 169109,
65
+ "dataset_name": "natural-disasters-from-social-media"
66
+ },
67
+ "validation": {
68
+ "name": "validation",
69
+ "num_bytes": 5293895,
70
+ "num_examples": 21139,
71
+ "dataset_name": "natural-disasters-from-social-media"
72
+ },
73
+ "test": {
74
+ "name": "test",
75
+ "num_bytes": 5296925,
76
+ "num_examples": 21139,
77
+ "dataset_name": "natural-disasters-from-social-media"
78
+ }
79
+ },
80
+ "version": {
81
+ "version_str": "0.0.0",
82
+ "major": 0,
83
+ "minor": 0,
84
+ "patch": 0
85
+ }
86
+ }
test/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "10127f26645a0a2f",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "test"
13
+ }
train/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:920be0a66e83bea8f5389fa7fbbe46a7adbe4b569dd1d802a068938c4ed7c309
3
+ size 39428368
train/dataset_info.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "csv",
3
+ "citation": "",
4
+ "config_name": "default",
5
+ "dataset_name": "natural-disasters-from-social-media",
6
+ "dataset_size": 52932817,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/train.csv": {
10
+ "num_bytes": 39817704,
11
+ "checksum": null
12
+ },
13
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/validation.csv": {
14
+ "num_bytes": 4977163,
15
+ "checksum": null
16
+ },
17
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/test.csv": {
18
+ "num_bytes": 4981112,
19
+ "checksum": null
20
+ }
21
+ },
22
+ "download_size": 49775979,
23
+ "features": {
24
+ "text": {
25
+ "dtype": "string",
26
+ "_type": "Value"
27
+ },
28
+ "target": {
29
+ "dtype": "int64",
30
+ "_type": "Value"
31
+ },
32
+ "SOURCE_FILE": {
33
+ "dtype": "string",
34
+ "_type": "Value"
35
+ },
36
+ "tweet_id": {
37
+ "dtype": "float64",
38
+ "_type": "Value"
39
+ },
40
+ "filename": {
41
+ "dtype": "string",
42
+ "_type": "Value"
43
+ },
44
+ "event_type": {
45
+ "dtype": "string",
46
+ "_type": "Value"
47
+ },
48
+ "event_type_detail": {
49
+ "dtype": "string",
50
+ "_type": "Value"
51
+ },
52
+ "label": {
53
+ "dtype": "int32",
54
+ "_type": "Value"
55
+ }
56
+ },
57
+ "homepage": "",
58
+ "license": "",
59
+ "size_in_bytes": 102708796,
60
+ "splits": {
61
+ "train": {
62
+ "name": "train",
63
+ "num_bytes": 42341997,
64
+ "num_examples": 169109,
65
+ "dataset_name": "natural-disasters-from-social-media"
66
+ },
67
+ "validation": {
68
+ "name": "validation",
69
+ "num_bytes": 5293895,
70
+ "num_examples": 21139,
71
+ "dataset_name": "natural-disasters-from-social-media"
72
+ },
73
+ "test": {
74
+ "name": "test",
75
+ "num_bytes": 5296925,
76
+ "num_examples": 21139,
77
+ "dataset_name": "natural-disasters-from-social-media"
78
+ }
79
+ },
80
+ "version": {
81
+ "version_str": "0.0.0",
82
+ "major": 0,
83
+ "minor": 0,
84
+ "patch": 0
85
+ }
86
+ }
train/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "7a19ba3cc4cc49e3",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "train"
13
+ }
validation/data-00000-of-00001.arrow ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96f6f2178bd2563c5c8bab0318bbb2d3c669e00b8ce429b4dee5624264437bb6
3
+ size 4931104
validation/dataset_info.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "builder_name": "csv",
3
+ "citation": "",
4
+ "config_name": "default",
5
+ "dataset_name": "natural-disasters-from-social-media",
6
+ "dataset_size": 52932817,
7
+ "description": "",
8
+ "download_checksums": {
9
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/train.csv": {
10
+ "num_bytes": 39817704,
11
+ "checksum": null
12
+ },
13
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/validation.csv": {
14
+ "num_bytes": 4977163,
15
+ "checksum": null
16
+ },
17
+ "hf://datasets/melisekm/natural-disasters-from-social-media@b16966b68eba8f44b6534bc8cd82e9fa02c53188/test.csv": {
18
+ "num_bytes": 4981112,
19
+ "checksum": null
20
+ }
21
+ },
22
+ "download_size": 49775979,
23
+ "features": {
24
+ "text": {
25
+ "dtype": "string",
26
+ "_type": "Value"
27
+ },
28
+ "target": {
29
+ "dtype": "int64",
30
+ "_type": "Value"
31
+ },
32
+ "SOURCE_FILE": {
33
+ "dtype": "string",
34
+ "_type": "Value"
35
+ },
36
+ "tweet_id": {
37
+ "dtype": "float64",
38
+ "_type": "Value"
39
+ },
40
+ "filename": {
41
+ "dtype": "string",
42
+ "_type": "Value"
43
+ },
44
+ "event_type": {
45
+ "dtype": "string",
46
+ "_type": "Value"
47
+ },
48
+ "event_type_detail": {
49
+ "dtype": "string",
50
+ "_type": "Value"
51
+ },
52
+ "label": {
53
+ "dtype": "int32",
54
+ "_type": "Value"
55
+ }
56
+ },
57
+ "homepage": "",
58
+ "license": "",
59
+ "size_in_bytes": 102708796,
60
+ "splits": {
61
+ "train": {
62
+ "name": "train",
63
+ "num_bytes": 42341997,
64
+ "num_examples": 169109,
65
+ "dataset_name": "natural-disasters-from-social-media"
66
+ },
67
+ "validation": {
68
+ "name": "validation",
69
+ "num_bytes": 5293895,
70
+ "num_examples": 21139,
71
+ "dataset_name": "natural-disasters-from-social-media"
72
+ },
73
+ "test": {
74
+ "name": "test",
75
+ "num_bytes": 5296925,
76
+ "num_examples": 21139,
77
+ "dataset_name": "natural-disasters-from-social-media"
78
+ }
79
+ },
80
+ "version": {
81
+ "version_str": "0.0.0",
82
+ "major": 0,
83
+ "minor": 0,
84
+ "patch": 0
85
+ }
86
+ }
validation/state.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_data_files": [
3
+ {
4
+ "filename": "data-00000-of-00001.arrow"
5
+ }
6
+ ],
7
+ "_fingerprint": "fa1770ff739c3055",
8
+ "_format_columns": null,
9
+ "_format_kwargs": {},
10
+ "_format_type": null,
11
+ "_output_all_columns": false,
12
+ "_split": "validation"
13
+ }