가장 가능성 높은 결과
비기술적 청중에게 결과를 설명할 때는 확률을 자세히 다루지 않고, 가장 가능성 높은 결과만 설명하는 편이 좋을 때가 있습니다. 예를 들어 고객 이탈 확률이 60%라고 말하는 대신, 가장 가능성 높은 결과는 고객이 이탈한다라고 말할 수 있습니다. 해석은 쉬워지지만, 세부적인 뉘앙스는 줄어드는 점이 트레이드오프입니다.
mdl_churn_vs_relationship, explanatory_data, plt_churn_vs_relationship가 준비되어 있고 dplyr가 로드되어 있습니다.
이 연습은 강의의 일부입니다
R로 시작하는 회귀 분석
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Update the data frame
prediction_data <- explanatory_data %>%
mutate(
has_churned = predict(mdl_churn_vs_relationship, explanatory_data, type = "response"),
# Add the most likely churn outcome
most_likely_outcome = ___
)
# See the result
prediction_data