Display pyGAM model summary into streamlit application.
Source: https://codeburst.io/pygam-getting-started-with-generalized-additive-models-in-python-457df5b4705f
import pandas as pd
from sklearn.datasets import load_boston
from pygam import LinearGAM
boston = load_boston()
df = pd.DataFrame(boston.data, columns=boston.feature_names)
target_df = pd.Series(boston.target)
df.head()
X = df
y = target_df
gam = LinearGAM(n_splines=10).gridsearch(X.values, y.values)
gam.summary()
As shown in image the output of gam.summary is not displaying with any of the st.* (display functions)