Skip to content

Commit 8a4807e

Browse files
authored
Update pca.py
removed the changes I added and not it is the same as original file
1 parent 4215764 commit 8a4807e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/pca.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77

88
@st.cache_data
99
def get_pca_df(scaled, n=5):
10-
11-
scaled_data = StandardScaler().fit_transform(scaled) #center-scaling the data for PCA
12-
10+
1311
# calculating Principal components
1412
pca = PCA(n_components=n)
1513
pca_df = pd.DataFrame(
16-
data=pca.fit_transform(scaled_data),
14+
data=pca.fit_transform(scaled),
1715
columns=[f"PC{x}" for x in range(1, n + 1)]
1816
)
1917
pca_df.index = scaled.index

0 commit comments

Comments
 (0)