diff --git a/Class_Mod/PCA_.py b/Class_Mod/PCA_.py index 74bd3de05f0468774d7b768589f682131b8c7528..1c4dbc6413a9157dd36a29e014bc9380c3698231 100644 --- a/Class_Mod/PCA_.py +++ b/Class_Mod/PCA_.py @@ -1,4 +1,4 @@ -from sklearn.decomposition import PCA +from Packages import * class LinearPCA: def __init__(self, X, Ncomp=10): @@ -82,6 +82,6 @@ class LinearPCA: def residuals(self): return self.res @property - def hotelling(self): + def hotelling_(self): #return pd.DataFrame(self.T2) return self.T2 \ No newline at end of file diff --git a/pages/1-samples_selection.py b/pages/1-samples_selection.py index 432dc3795a5822b265f2158cc13daf9523fa03db..3b88340c4bea7dfde20f99d353bd25a97846dad5 100644 --- a/pages/1-samples_selection.py +++ b/pages/1-samples_selection.py @@ -131,8 +131,8 @@ with container2: st.write('T²-Hotelling vs Q residuals plot') ax2 = st.selectbox("Component", options=model.scores_.columns, index=4) - t = model.scores_ - fig = px.scatter(t, x=axis1, y=t.columns[1]) + t = model.hotelling_ + fig = px.scatter(t, x=t[ax2], y=t[ax2]) st.plotly_chart(fig) with qexp: