티스토리 뷰
728x90
normal과 randn이 헷갈려서 정리
넘파이의 랜덤 샘플링하는 함수이고, 원하는 분포를 만들 수 있습니다.
1. np.random.normal - 정규분포
- Draw random samples from a normal (Gaussian) distribution.
- Returns: ndarray or scalar
2. np.random.randn - 표준정규준포
- Return a sample (or samples) from the “standard normal” distribution.
- Returns: ndarray or float
따라서 평균이 0이고 표준편차가 1인 표준정규분포를 만들어 주기 위해선
import numpy as np
# numpy.random.normal
np.random.normal(0, 1, size)
# numpy.random.randn
np.randoom.randn(d0, d1, ..., dn) # parameters: the dimensions of the returned array
728x90
'Skills > Pythons' 카테고리의 다른 글
[macOS] Homebrew 설치 (0) | 2023.03.08 |
---|---|
[macOS] pip 설치 방법 (0) | 2023.03.08 |
[Python] 프로그래머스 배열 회전 시키기 (0) | 2022.12.29 |
[Python] Jupyter module - %load_ext autoreload %autoreload 2 (0) | 2022.12.23 |
[Python] from __future__ import print_function (0) | 2022.12.23 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- style transfer
- support set
- 구글드라이브서버다운
- NLP
- 도커
- 구글드라이브연동
- stylegan
- vscode 자동 저장
- python
- 데이터셋다운로드
- 서버구글드라이브연동
- 파이썬 클래스 계층 구조
- Unsupervised learning
- 도커 컨테이너
- 퓨샷러닝
- 딥러닝
- clip
- 파이썬 클래스 다형성
- Prompt
- CNN
- prompt learning
- 프롬프트
- cs231n
- 파이썬 딕셔너리
- 구글드라이브다운
- docker
- 서버에다운
- few-shot learning
- 구글드라이브서버연동
- 파이썬
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함
250x250