summary.performance_bin: 비닝된 변수의 성능 요약

Description Usage Arguments Details Value See Also Examples

Description

"performance_bin"에 대한 요약 방법으로 이항 분류 모델의 성능을 평가하기 위한 요약 메트릭.

Usage

1
2
## 'performance_bin' 클래스 대상의 S3 메서드
summary(object, ...)

Arguments

object

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

...

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

Details

print()는 "performance_bin" 객체의 비닝 테이블 정보만을 출력합니다. summary.performance_bin() 일반 메트릭 및 유의성 검정을 따른 결과를 포함합니다.:

Value

NULL.

See Also

performance_bin, plot.performance_bin, binning_by, summary.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
# 예제를 위한 데이터 생성
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)

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