강의

멘토링

커뮤니티

Inflearn Community Q&A

jeonsm95752781's profile image
jeonsm95752781

asked

[Revised Edition] The Complete Guide to Python Machine Learning

Minimizing the cost function RSS via gradient descent - Implementing gradient descent in Python code

rand, randn

Written on

·

818

0

rand와 randn의 기능적 차이가 무엇이 있나요? 

머신러닝 배워볼래요? 통계python

Answer 1

0

dooleyz3525님의 프로필 이미지
dooleyz3525
Instructor

안녕하십니까,

np.random의 rand와 randn은 비슷하지만,  난수를 생성하는데 대상이 되는 분포 곡선이 다릅니다.

rand는 0 ~ 1 사이의 uniform distribution(균일 분포)상에서 난수를 추출하고

randn는 평균이 0, 표준편차가 1인 normal distribution(표준 정규분포)에서 난수를 추출합니다.

감사합니다.

jeonsm95752781's profile image
jeonsm95752781

asked

Ask a question