Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
sentiment-classification
Languages:
English
Size:
100K - 1M
ArXiv:
Fix definition of positive/negative
#3
by
Davidg707
- opened
No description provided.
The original paper seems to contain a typo, referring to stars 1/2 for negative and 3/4 for positive.
I checked the data like so:
import datasets
ds_yp = datasets.load_dataset("yelp_polarity", split="test")
ds_yf = datasets.load_dataset("yelp_review_full", split="test")
df_yp = ds_yp.to_pandas().set_index("text").rename(columns={"label": "Sentiment"})
df_yf = ds_yf.to_pandas().set_index("text").rename(columns={"label": "Stars"})
df = df_yp.join(df_yf).dropna().sort_values(["Sentiment", "Stars"])
uniques = df.groupby(["Sentiment", "Stars"]).groups.keys()
print(uniques)
And can see that what they meant to say is that
1/2 stars = negative
3 stars = excluded
4/5 stars = positive.
In the data it's all zero-indexed so the raw values are 1 lower.
Hi @Davidg707 , thanks a lot for the investigation and the fix.
Definitely, it seems the authors meant to say something different from what they finally said...
I'm adding here the output of your investigation for completeness:
dict_keys([(0, 0.0), (0, 1.0), (1, 3.0), (1, 4.0)])