[기능]
정규분포로부터 임의의 샘플들을 그린다.
(정규분포의 확률밀도함수는 가우스와 라플라스에 의해 도출된다?)
*normal distribution:정규분포
[파라미터]
numpy.random.normal(loc=0.0,scales=1.0,size=None)
차례대로 평균의 위치는 어디에 놓을지 여기선 0에 놓는다고 기본값으로 되어있네요.
scale은 표준편차,size는 샘플의 사이즈를 의미하는 듯합니다.
[예시]
[참고사이트]
https://rfriend.tistory.com/284
[Python NumPy] 무작위 표본 추출, 난수 만들기 (random sampling, random number generation)
이번 포스팅에서는 시간과 비용 문제로 전수 조사를 못하므로 표본 조사를 해야 할 때, 기계학습 할 때 데이터셋을 훈련용/검증용/테스트용으로 샘플링 할 때, 또는 다양한 확률 분포로 부터 데
rfriend.tistory.com
https://numpy.org/doc/stable/reference/random/generated/numpy.random.normal.html
numpy.random.normal — NumPy v1.19 Manual
Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if loc and scale are both scalars. Otherwise, np.broadcast(loc, scale).size samples are drawn.
numpy.org
'오늘의 공부 > numpy' 카테고리의 다른 글
오늘의 numpy:[numpy.random.rand()] (0) | 2020.11.17 |
---|