Spaces:
Sleeping
Sleeping
File size: 1,796 Bytes
71b20ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
import streamlit as st
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import plotly.express as px
import time
def report():
df = pd.read_csv('./csv/training_history.csv')
df.rename(columns={'Unnamed: 0':'epoch'}, inplace=True)
st.header("Model Report")
st.subheader("Performance")
plot_anim = st.sidebar.selectbox(label='Select Performance Metrics', options=["Accuracy", "Loss"])
def performance_plot(data):
progress_bar = st.sidebar.progress(0)
status_text = st.sidebar.empty()
last_rows = [df[data].iloc[0]]
chart = st.line_chart(last_rows, use_container_width=True, height=400)
for i in range(1, len(df)):
new_rows = [df[data].iloc[i]]
status_text.text(f"{round(i/63 * 100, 2)} % Complete")
chart.add_rows(new_rows)
progress_bar.progress(i)
last_rows = new_rows
time.sleep(0.05)
progress_bar.empty()
if plot_anim == "Accuracy":
data_plot = ['accuracy', 'val_accuracy']
performance_plot(data_plot)
else:
data_plot = ['loss', 'val_loss']
performance_plot(data_plot)
st.button("Re-run")
st.markdown('''
* In this model, it can be observed that the convergence occurs before epoch 20.
* From epoch 40-50, the model starts to stagnate, prompting a reduction in the learning rate.
* However, it can be seen that the model is slightly less stable in validation before the learning rate reduction.
* Based on these observations, we can say that this model is still slightly underfit.
''')
if __name__ == "__main__":
report()
|