Add full metrics table to analysis script
Browse files- util/analysis/run.py +14 -2
util/analysis/run.py
CHANGED
@@ -86,7 +86,19 @@ def generate_plots(df: pd.DataFrame) -> None:
|
|
86 |
_summary.loc[k] = summary.loc[k].apply(fmtr)
|
87 |
summary = _summary
|
88 |
summary.rename(columns=col_rename, inplace=True)
|
89 |
-
print(summary)
|
90 |
summary.to_latex("summary.tex", column_format="lrrrrr")
|
91 |
|
92 |
-
print(df.corr())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
_summary.loc[k] = summary.loc[k].apply(fmtr)
|
87 |
summary = _summary
|
88 |
summary.rename(columns=col_rename, inplace=True)
|
89 |
+
# print(summary)
|
90 |
summary.to_latex("summary.tex", column_format="lrrrrr")
|
91 |
|
92 |
+
# print(df.corr())
|
93 |
+
df = df.sort_values(by="name")
|
94 |
+
|
95 |
+
df.rename(index=lambda x: x.replace("_", r"\_"), inplace=True)
|
96 |
+
|
97 |
+
col_groups = [
|
98 |
+
["Token Count", "Line Count", "Tokens per Line", "Tokens per Line SD"],
|
99 |
+
["Unique Tokens", "Unique Lines", "EoS Token Present", "EoS Padding"],
|
100 |
+
["1-gram Entropy", "1-gram Normalized Entropy", "Entropy per Line"],
|
101 |
+
["2-gram Entropy", "2-gram Conditional Entropy"],
|
102 |
+
]
|
103 |
+
for i, cols in enumerate(col_groups):
|
104 |
+
df.to_latex(f"big-table-{i+1}.tex", columns=cols)
|