plot.performance_bin: "performance_bin" 객체에 대한 성능 시각화

Description Usage Arguments See Also Examples

Description

performance_bin을 사용하여 빈별 빈도와 WoE를 이해하기 위해 플롯을 생성합니다.

Usage

1
2
## 'performance_bin' 클래스 대상의 S3 메서드
plot(x, typographic = TRUE, ...)

Arguments

x

"performance_bin" 클래스 객체로, performance_bin()을 호출했을 때의 일반적인 결과

typographic

logical. 적용 여부는 ggplot2 시각화에서 타이포 그래픽 요소의 중점에 따라 변경됩니다. 기본값은 TRUE 입니다. 값이 TRUE이면 hrbrthemes 패키지를 사용한 타이포그래픽 요소에 중점을 둔 기본 테마를 제공합니다.

...

다른 메서드에서 또는 다른 메서드로 전달되는 추가 인수

See Also

performance_bin, summary.performance_bin, binning_by, plot.optimal_bins.

Examples

 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
# 예제를 위한 데이터 생성
heartfailure2 <- heartfailure

set.seed(123)
heartfailure2[sample(seq(NROW(heartfailure2)), 5), "creatinine"] <- NA

# 타깃 변수를 0(음)과 1(양)로 변경
heartfailure2$death_event_2 <- ifelse(heartfailure2$death_event %in% "Yes", 1, 0)

# creatinine에서 platelets_bin으로 비닝
breaks <- c(0,  1,  2, 10)
heartfailure2$creatinine_bin <- cut(heartfailure2$creatinine, breaks)

# 비닝된 변수의 성능 진단
perf <- performance_bin(heartfailure2$death_event_2, heartfailure2$creatinine_bin)
perf
summary(perf)

plot(perf)

# 비닝된 변수의 성능 진단 (NA 제외)
perf <- performance_bin(heartfailure2$death_event_2, heartfailure2$creatinine_bin, na.rm = TRUE)
perf
summary(perf)

plot(perf)
plot(perf, typographic = FALSE)

bit2r/kodlookr documentation built on Dec. 19, 2021, 9:49 a.m.