Spaces:
Runtime error
Runtime error
import streamlit as st | |
import pandas as pd | |
from filter_dataframe import filter_dataframe | |
import plotly.express as px | |
def get_domain_transfer_data(): | |
return pd.read_parquet("data/domain_transfer.parquet") | |
TITLE = "Cross-domain Transfer" | |
st.set_page_config(page_title=TITLE, page_icon="📈") | |
st.markdown(f"# {TITLE}") | |
df = get_domain_transfer_data() | |
st.write("""\ | |
The figure below shows the results of an experiment comparing the effectiveness of transfer learning between data modalities. As expected, when models are tested against datasets from the same domain (news, social media, reviews), the average performance is much higher than on out-of-domain datasets. What is striking is the visible deterioration of the performance of models trained in the news domain. When knowledge transfer happens between social media and review domains, the average performance of models stays relatively the same.""" | |
) | |
st.plotly_chart( | |
px.box( | |
df, | |
x="train_domain", | |
y="macro_f1_score", | |
color="test_domain", | |
category_orders={"train_domain": ["news", "reviews", "social_media"]}, | |
labels={ | |
"train_domain": "Train Domain", | |
"test_domain": "Test Domain", | |
"macro_f1_score": "Macro F1 Score", | |
} | |
) | |
) |