Szymon Woźniak commited on
Commit
08717a0
1 Parent(s): 4a15609

add domain transfer plot

Browse files
data/domain_transfer.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b60a86c27ec66dcae282a040300fe83d96b48f84bf46c45afd4c23dc374ea5ad
3
+ size 4865
pages/4_Domain_Transfer.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ from filter_dataframe import filter_dataframe
4
+ import plotly.express as px
5
+
6
+
7
+ @st.cache_data
8
+ def get_domain_transfer_data():
9
+ return pd.read_parquet("data/domain_transfer.parquet")
10
+
11
+
12
+ TITLE = "Cross-domain Transfer"
13
+
14
+ st.set_page_config(page_title=TITLE, page_icon="📈")
15
+
16
+ st.markdown(f"# {TITLE}")
17
+ st.sidebar.header(TITLE)
18
+ st.write(
19
+ """TODO: Description"""
20
+ )
21
+
22
+ df = get_domain_transfer_data()
23
+
24
+ st.plotly_chart(
25
+ px.box(
26
+ df,
27
+ x="train_domain",
28
+ y="macro_f1_score",
29
+ color="test_domain",
30
+ category_orders={"train_domain": ["news", "reviews", "social_media"]},
31
+ labels={
32
+ "train_domain": "Train Domain",
33
+ "test_domain": "Test Domain",
34
+ "macro_f1_score": "Macro F1 Score",
35
+ }
36
+ )
37
+ )
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  pandas
2
- numpy
 
 
1
  pandas
2
+ numpy
3
+ plotly