init
Browse files- data/tweet_hate_balance_test0_seed0/train.jsonl +2 -2
- data/tweet_hate_balance_test0_seed0/validation.jsonl +2 -2
- data/tweet_hate_balance_test0_seed1/train.jsonl +2 -2
- data/tweet_hate_balance_test0_seed1/validation.jsonl +2 -2
- data/tweet_hate_balance_test0_seed2/train.jsonl +2 -2
- data/tweet_hate_balance_test0_seed2/validation.jsonl +2 -2
- data/tweet_hate_balance_test1_seed0/train.jsonl +2 -2
- data/tweet_hate_balance_test1_seed0/validation.jsonl +2 -2
- data/tweet_hate_balance_test1_seed1/train.jsonl +2 -2
- data/tweet_hate_balance_test1_seed1/validation.jsonl +2 -2
- data/tweet_hate_balance_test1_seed2/train.jsonl +2 -2
- data/tweet_hate_balance_test1_seed2/validation.jsonl +2 -2
- data/tweet_hate_balance_test2_seed0/train.jsonl +2 -2
- data/tweet_hate_balance_test2_seed0/validation.jsonl +2 -2
- data/tweet_hate_balance_test2_seed1/train.jsonl +2 -2
- data/tweet_hate_balance_test2_seed1/validation.jsonl +2 -2
- data/tweet_hate_balance_test2_seed2/train.jsonl +2 -2
- data/tweet_hate_balance_test2_seed2/validation.jsonl +2 -2
- data/tweet_hate_balance_test3_seed0/train.jsonl +2 -2
- data/tweet_hate_balance_test3_seed0/validation.jsonl +2 -2
- data/tweet_hate_balance_test3_seed1/train.jsonl +2 -2
- data/tweet_hate_balance_test3_seed1/validation.jsonl +2 -2
- data/tweet_hate_balance_test3_seed2/train.jsonl +2 -2
- data/tweet_hate_balance_test3_seed2/validation.jsonl +2 -2
- experiments/main.sh +34 -16
- process/tweet_hate_balance.py +6 -4
- tweet_temporal_shift.py +1 -1
data/tweet_hate_balance_test0_seed0/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2da6d943a79e0ca6d66c1e8326da0b0daf42b53ae47569b01b9af54672e2de8f
|
3 |
+
size 291732
|
data/tweet_hate_balance_test0_seed0/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b98e89bd496a345570938fae97ae061f8daaa894c4e265b5341be22496752bf
|
3 |
+
size 76084
|
data/tweet_hate_balance_test0_seed1/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e12a8289d71cfde1bd33f360ed19ee0d4170a4188182552958ec1d8370553e95
|
3 |
+
size 288664
|
data/tweet_hate_balance_test0_seed1/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7e91ba5934a98e3dcd4b7ca1f1bf517874bf1ffef03a007e150a6bcdf61e98c7
|
3 |
+
size 76325
|
data/tweet_hate_balance_test0_seed2/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3626c1b044c36377420dfa85dfa90039405f7f8cba8d74d7cab58dfb07b7016b
|
3 |
+
size 290136
|
data/tweet_hate_balance_test0_seed2/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e404c29af3690234566f478c1222f958cad44610e54e4b4aaf241487b93a965b
|
3 |
+
size 78226
|
data/tweet_hate_balance_test1_seed0/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fc9e87d836f11dd9299e32ea47e0e2784ba9429886bcc42aea1382f5adbf01ff
|
3 |
+
size 291859
|
data/tweet_hate_balance_test1_seed0/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae2f50faade3808c072ca527049081658f07618f9060700cffa98c765630d8fc
|
3 |
+
size 76128
|
data/tweet_hate_balance_test1_seed1/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ba9aca6ff3afc523d219c3f7966a93ee5a6cc75a7610dbee9f534b23bb5f47a2
|
3 |
+
size 289033
|
data/tweet_hate_balance_test1_seed1/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d38d1f5afa509654fd3b7134137a0d05e0743f852f12017a3227e010f99047a5
|
3 |
+
size 76864
|
data/tweet_hate_balance_test1_seed2/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:58af673485bc6761b65e644192c5c6dc9de819f00b250d5e9746ed03070690c5
|
3 |
+
size 290295
|
data/tweet_hate_balance_test1_seed2/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59214336e48b3949416781e43bca77d688e655a7439bae52d204ecc21b00d950
|
3 |
+
size 77733
|
data/tweet_hate_balance_test2_seed0/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fe6292739dda03866b2b54d4e45c1002b0c9988bcf195df9cf17c0ddcafc25c5
|
3 |
+
size 290563
|
data/tweet_hate_balance_test2_seed0/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:29ce18a389fba779c7113e564faa4b8c1dbbc7264501800d2a06ee57048e3a69
|
3 |
+
size 76330
|
data/tweet_hate_balance_test2_seed1/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5b2c06a76d54d53c45a7df7a4cc77f2c9157f0ca5a4650f5bde14f13442607f4
|
3 |
+
size 288134
|
data/tweet_hate_balance_test2_seed1/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ebbdf86fea3afb3df85b5f7bb1a0eea24b71c0651adca14817310409f7267c1e
|
3 |
+
size 76898
|
data/tweet_hate_balance_test2_seed2/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6a7fac6e2e756cc5d34fd37bb22cc75740c05fca7ce197579c3fbd847e8e7c9
|
3 |
+
size 288973
|
data/tweet_hate_balance_test2_seed2/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d7e6b5b1c9692e01540683242b32f1bcdd471d555baff291eb827a53c759c7e2
|
3 |
+
size 77829
|
data/tweet_hate_balance_test3_seed0/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6cf1b415bdf7bb18b9f2f27d10cad2fb87f324a8eef7f902907c5676de5deb3e
|
3 |
+
size 292162
|
data/tweet_hate_balance_test3_seed0/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2dbc08964d055f321d8931f0b901eb063d39471e47319e18bf0c8a1b0c3245e6
|
3 |
+
size 77106
|
data/tweet_hate_balance_test3_seed1/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:80948fd771616aa7fbe99091cfaf5eff7f455d7d6deafe58f3fbaff5ba126622
|
3 |
+
size 288698
|
data/tweet_hate_balance_test3_seed1/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b22170e691e3eaa936b309285cd9c55ef1c1102a0fd6f57eb239645226a15e6
|
3 |
+
size 76747
|
data/tweet_hate_balance_test3_seed2/train.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:06436ce3a32b66fed8cbcbd7d72671d7c27c18e2c70cd77a76ff6f968a917c73
|
3 |
+
size 289822
|
data/tweet_hate_balance_test3_seed2/validation.jsonl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7d3f8f0b20cf24ec927ffcdee5d62d72d3f3d0d6909e03c6cf2dc597bee8ec25
|
3 |
+
size 77757
|
experiments/main.sh
CHANGED
@@ -2,41 +2,59 @@
|
|
2 |
MODEL="roberta-base"
|
3 |
MODEL="vinai/bertweet-base"
|
4 |
MODEL="jhu-clsp/bernice"
|
5 |
-
MODEL="roberta-large"
|
6 |
-
MODEL="vinai/bertweet-large"
|
7 |
MODEL="cardiffnlp/twitter-roberta-base-2019-90m"
|
8 |
MODEL="cardiffnlp/twitter-roberta-base-dec2020"
|
9 |
MODEL="cardiffnlp/twitter-roberta-base-2021-124m"
|
10 |
-
MODEL="
|
|
|
11 |
MODEL="cardiffnlp/twitter-roberta-large-2022-154m"
|
12 |
|
|
|
|
|
|
|
13 |
# EMOJI
|
14 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_temporal"
|
15 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
16 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random0_seed0"
|
17 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
18 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random1_seed0"
|
19 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
20 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random2_seed0"
|
21 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
22 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random3_seed0"
|
23 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
24 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random0_seed1"
|
25 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
26 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random1_seed1"
|
27 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
28 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random2_seed1"
|
29 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
30 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random3_seed1"
|
31 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
32 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random0_seed2"
|
33 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
34 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random1_seed2"
|
35 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
36 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random2_seed2"
|
37 |
-
rm -rf ckpt/emoji*${MODEL##*/}*
|
38 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random3_seed2"
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# HATE
|
42 |
python model_finetuning_hate.py -m "${MODEL}" -d "hate_temporal"
|
|
|
2 |
MODEL="roberta-base"
|
3 |
MODEL="vinai/bertweet-base"
|
4 |
MODEL="jhu-clsp/bernice"
|
|
|
|
|
5 |
MODEL="cardiffnlp/twitter-roberta-base-2019-90m"
|
6 |
MODEL="cardiffnlp/twitter-roberta-base-dec2020"
|
7 |
MODEL="cardiffnlp/twitter-roberta-base-2021-124m"
|
8 |
+
MODEL="roberta-large"
|
9 |
+
MODEL="vinai/bertweet-large"
|
10 |
MODEL="cardiffnlp/twitter-roberta-large-2022-154m"
|
11 |
|
12 |
+
# todo
|
13 |
+
MODEL="cardiffnlp/twitter-roberta-base-2022-154m"
|
14 |
+
|
15 |
# EMOJI
|
16 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_temporal"
|
|
|
17 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random0_seed0"
|
|
|
18 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random1_seed0"
|
|
|
19 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random2_seed0"
|
|
|
20 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random3_seed0"
|
|
|
21 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random0_seed1"
|
|
|
22 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random1_seed1"
|
|
|
23 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random2_seed1"
|
|
|
24 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random3_seed1"
|
|
|
25 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random0_seed2"
|
|
|
26 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random1_seed2"
|
|
|
27 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random2_seed2"
|
|
|
28 |
python model_finetuning_emoji.py -m "${MODEL}" -d "emoji_random3_seed2"
|
29 |
+
|
30 |
+
# HATE
|
31 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_temporal"
|
32 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
33 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random0_seed0"
|
34 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
35 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random1_seed0"
|
36 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
37 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random2_seed0"
|
38 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
39 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random3_seed0"
|
40 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
41 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random0_seed1"
|
42 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
43 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random1_seed1"
|
44 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
45 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random2_seed1"
|
46 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
47 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random3_seed1"
|
48 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
49 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random0_seed2"
|
50 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
51 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random1_seed2"
|
52 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
53 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random2_seed2"
|
54 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
55 |
+
python model_finetuning_hate.py -m "${MODEL}" -d "hate_balance_random3_seed2"
|
56 |
+
rm -rf ckpt/hate*${MODEL##*/}*
|
57 |
+
|
58 |
|
59 |
# HATE
|
60 |
python model_finetuning_hate.py -m "${MODEL}" -d "hate_temporal"
|
process/tweet_hate_balance.py
CHANGED
@@ -34,15 +34,17 @@ def sampler(chunk_index, r_seed):
|
|
34 |
|
35 |
label_train_tmp_dist = dict(zip(*np.unique(df_train_tmp["gold_label_binary"], return_counts=True)))
|
36 |
assert label_train_tmp_dist[0] < label_train_dist[0] and label_train_tmp_dist[1] < label_train_dist[1]
|
37 |
-
df_train_tmp_p = df_train_positive.sample(label_train_dist[
|
38 |
-
df_train_tmp_n =
|
39 |
df_train_tmp = pd.concat([df_train_tmp, df_train_tmp_p, df_train_tmp_n])
|
|
|
40 |
|
41 |
label_val_tmp_dist = dict(zip(*np.unique(df_val_tmp["gold_label_binary"], return_counts=True)))
|
42 |
assert label_val_tmp_dist[0] < label_val_dist[0] and label_val_tmp_dist[1] < label_val_dist[1]
|
43 |
-
df_val_tmp_p = df_val_positive.sample(label_val_dist[
|
44 |
-
df_val_tmp_n =
|
45 |
df_val_tmp = pd.concat([df_val_tmp, df_val_tmp_p, df_val_tmp_n])
|
|
|
46 |
return list(df_train_tmp.T.to_dict().values()), list(df_val_tmp.T.to_dict().values())
|
47 |
|
48 |
for n in range(4):
|
|
|
34 |
|
35 |
label_train_tmp_dist = dict(zip(*np.unique(df_train_tmp["gold_label_binary"], return_counts=True)))
|
36 |
assert label_train_tmp_dist[0] < label_train_dist[0] and label_train_tmp_dist[1] < label_train_dist[1]
|
37 |
+
df_train_tmp_p = df_train_positive.sample(label_train_dist[1] - label_train_tmp_dist[1], random_state=r_seed)
|
38 |
+
df_train_tmp_n = df_train_negative.sample(label_train_dist[0] - label_train_tmp_dist[0], random_state=r_seed)
|
39 |
df_train_tmp = pd.concat([df_train_tmp, df_train_tmp_p, df_train_tmp_n])
|
40 |
+
assert dict(zip(*np.unique(df_train_tmp["gold_label_binary"], return_counts=True))) == label_train_dist
|
41 |
|
42 |
label_val_tmp_dist = dict(zip(*np.unique(df_val_tmp["gold_label_binary"], return_counts=True)))
|
43 |
assert label_val_tmp_dist[0] < label_val_dist[0] and label_val_tmp_dist[1] < label_val_dist[1]
|
44 |
+
df_val_tmp_p = df_val_positive.sample(label_val_dist[1] - label_val_tmp_dist[1], random_state=r_seed)
|
45 |
+
df_val_tmp_n = df_val_negative.sample(label_val_dist[0] - label_val_tmp_dist[0], random_state=r_seed)
|
46 |
df_val_tmp = pd.concat([df_val_tmp, df_val_tmp_p, df_val_tmp_n])
|
47 |
+
assert dict(zip(*np.unique(df_val_tmp["gold_label_binary"], return_counts=True))) == label_val_dist
|
48 |
return list(df_train_tmp.T.to_dict().values()), list(df_val_tmp.T.to_dict().values())
|
49 |
|
50 |
for n in range(4):
|
tweet_temporal_shift.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
import json
|
3 |
import datasets
|
4 |
|
5 |
-
_VERSION = "1.1.
|
6 |
_TWEET_TEMPORAL_DESCRIPTION = """"""
|
7 |
_TWEET_TEMPORAL_CITATION = """"""
|
8 |
_TWEET_TOPIC_DESCRIPTION = """
|
|
|
2 |
import json
|
3 |
import datasets
|
4 |
|
5 |
+
_VERSION = "1.1.4"
|
6 |
_TWEET_TEMPORAL_DESCRIPTION = """"""
|
7 |
_TWEET_TEMPORAL_CITATION = """"""
|
8 |
_TWEET_TOPIC_DESCRIPTION = """
|