0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

数学_56

Posted at

考察

相関係数の算出
定義どおり計算すれば良いけど、実にめんどい

コードで解決

0.7735

x = np.array([2, 3, 5, 4, 5])
y = np.array([3, 2, 4, 4, 5])
df = pd.DataFrame([x, y]).T

# Pandasの場合
print(df.corr())

# numpyの場合
print(np.corrcoef(x, y))

Screenshot from 2023-01-09 19-57-23.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?