Skip to content

Instantly share code, notes, and snippets.

View XWilliamY's full-sized avatar

William Yang XWilliamY

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
target_y = 'predicted_conf'
sns.boxplot(x='predicted_lang',
y=target_y,
data=copy_detected_langs[(copy_detected_langs['predicted_conf'] >= 0) & \
(copy_detected_langs['predicted_lang'].isin(names))],
order = names
)
# get relevant indexes
text_lengths = copy_detected_langs['text_length']\
.value_counts(normalize=True)\
.sort_values(ascending=False)\
.to_frame()[:20].index
# set styling
sns.set(font_scale=1.4)
sns.set_style("whitegrid")
fig, axes = plt.subplots(1, figsize=(15, 10), dpi=1000)