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 5 years have passed since last update.

ガウシアン基底をプロットする

Posted at

狙い

タイトルそのまま

コード

import matplotlib.pyplot as plt
import numpy as np

rng = np.random.RandomState(1)
x = 10 * rng.rand(500)

def multi_gauss(X, j, s=2):
    return np.exp(-(X - j)**2 / (2 * s **2))

for i in range(0,20):
    y = multi_gauss(x, i)
    plt.scatter(x, y, label=str(i));

結果

image.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?