分散共分散行列からデータ生成(Python, Google Colaboratory を使用)
【サイト内の関連ページ】
前準備
Python の準備(Windows,Ubuntu 上)
- Windows での Python 3.10,関連パッケージ,Python 開発環境のインストール(winget を使用しないインストール): 別ページ »で説明
- Ubuntu では,システム Pythonを使うことができる.Python3 開発用ファイル,pip, setuptools のインストール: 別ページ »で説明
【サイト内の関連ページ】
- Python のまとめ: 別ページ »にまとめ
- Google Colaboratory の使い方など: 別ページ »で説明
【関連する外部ページ】 Python の公式ページ: https://www.python.org/
分散共分散行列からデータ生成(Python, Google Colaboratory を使用)
N はデータ数.c は平均.corv は分散共分散行列.
20 個のデータがプロットされている
%matplotlib inline
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore') # Suppress Matplotlib warnings
plt.style.use('ggplot')
plt.plot(a[:,0], a[:,1], 'ro')
plt.show()