강의

멘토링

커뮤니티

Inflearn Community Q&A

paul11421711's profile image
paul11421711

asked

[After Work Side Projects] Big Data Analytics Engineer Practical Exam (Task Types 1, 2, 3)

5th Mock Exam Question Types (Practical Type 2)

RandomForestRegressor() 그럼 여기에서도

Resolved

Written on

·

216

0

  • random_state=0 모 이런식으로 고정값을 넣어 주는게 좋겠네요 ^^

python머신러닝빅데이터pandas빅데이터분석기사

Answer 1

0

roadmap님의 프로필 이미지
roadmap
Instructor

네 어떤 전처리 작업을 했을 때 결과가 달라지게 되는데

random_state를 고정하지 않으면

정확히 무엇 때문에 성능이 달라졌는지 파악하기 어렵습니다..

paul1142님의 프로필 이미지
paul1142
Questioner

검증용 데이터 분리 시 from sklearn.model_selection import train_test_split X_tr, X_val, y_tr, y_val = train_test_split(train, y_train, test_size=0.2, random_state=2022) X_tr.shape, X_val.shape, y_tr.shape, y_val.shape

 

이렇게 한번 random_state= 값을 주고 나서

RandomForest 값 넣을 때도 또 andom_state= 을 줘야 결과가 고정 된다는 거죠 ?

roadmap님의 프로필 이미지
roadmap
Instructor

네 각각 다른 함수라서 각각 필요합니다.

 

paul11421711's profile image
paul11421711

asked

Ask a question