Skip to content

Commit

Permalink
Update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Haleshot committed Nov 1, 2024
1 parent 8a6727d commit e5697d7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import numpy as np


def calculate_correlation_matrix(X : np.ndarray, Y=None):
def calculate_correlation_matrix(X, Y=None):
# Your code here
pass
if Y:
pass
cov = np.cov(X)
std = np.std(X)
corr = cov / std * std
return corr


X = np.array([[1, 2], [3, 4], [5, 6]])
Expand Down

0 comments on commit e5697d7

Please sign in to comment.