음이항 모형의 신뢰 구간
앞에서 적합한 게(카라프) 모형을 이어서, 음이항 모형과 Poisson 회귀 모형의 신뢰 구간을 비교해 보겠습니다.
Poisson 회귀 모형 crab_pois, 음이항 모형 crab_NB, 그리고 crab 데이터셋이 워크스페이스에 미리 로드되어 있습니다.
이 연습은 강의의 일부입니다
Python으로 배우는 Generalized Linear Models
연습 안내
crab_pois모형의 신뢰 구간을 계산하고 출력하세요.crab_NB모형의 신뢰 구간을 계산하고 출력하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Compute confidence intervals for crab_Pois model
print('Confidence intervals for the Poisson model')
____(____.____)
# Compute confidence intervals for crab_NB model
print('Confidence intervals for the Negative Binomial model')
____(____.____)