Web Analytics

missForest

⭐ 109 stars Korean by stekhoven

🌐 언어

missForest

CRAN 상태 CRAN RStudio 미러 다운로드 CRAN RStudio 미러 다운로드 R-CMD-체크 test-coverage License: GPL (≥ 2)-blue.svg)

missForest는 R에서 혼합형 표 형식 데이터에 대한 비모수적 결측값 대체 방법입니다. 수치형 및 범주형 변수를 동시에 처리하며, 랜덤 포레스트를 반복적으로 학습시켜 관측된 값으로 결측값을 예측합니다. 명시적인 모델링 가정이나 행렬 분해 없이, 기본적으로 강력한 예측 성능을 제공합니다.

패키지에는 대체 오류 측정, 실험을 위한 결측값 생성, 변수 타입 확인 유틸리티도 포함되어 있습니다.


설치

# CRAN (recommended)
install.packages("missForest")

Development version (from GitHub)

install.packages("remotes")

remotes::install_github("stekhoven/missForest")


Quick start

library(missForest)

Example data

data(iris)

Introduce ~20% MCAR missingness

set.seed(81) iris_mis <- prodNA(iris, noNA = 0.20)

Impute with default backend (ranger)

imp <- missForest(iris_mis, xtrue = iris, verbose = TRUE)

Imputed data

head(imp$ximp)

Estimated OOB errors (NRMSE for numeric, PFC for factors)

imp$OOBerror

True error if xtrue was provided (for benchmarking only)

imp$error

백엔드 선택하기

# Legacy behavior using randomForest
imp_rf <- missForest(iris_mis, backend = "randomForest")

Explicitly use ranger with limited threads

imp_rg <- missForest(iris_mis, backend = "ranger", num.threads = 2)

병렬화

parallelize를 통해 두 가지 모드를 사용할 수 있습니다:

# Not run:

library(doParallel)

registerDoParallel(2)

imp_vars <- missForest(iris_mis, parallelize = "variables", verbose = TRUE)

imp_fors <- missForest(iris_mis, parallelize = "forests", verbose = TRUE, num.threads = 2)


API 개요

missForest(xmis, ...)

핵심 보간 함수.

주요 인자:

backend = "ranger"용 인자 매핑 일부:

유틸리티

---

팁 및 모범 사례

  set.seed(123); imp <- missForest(x)
  ``
  • 프로토타입 제작 시 반복 속도를 높이기 위해 ntree 값을 낮출 수 있습니다.
---

인용

missForest를 사용하신 경우, 다음을 인용해 주세요:

Stekhoven, D. J. & Bühlmann, P. (2012). MissForest—비모수적 결측값 대체 방법, 혼합형 데이터용.* Bioinformatics, 28(1), 112–118. https://doi.org/10.1093/bioinformatics/btr597

패키지 자체도 인용할 수 있습니다:

r citation("missForest") ``


Contributing

Issues and pull requests are welcome. Please include a minimal reproducible example when reporting bugs. For performance discussions, share small benchmarks and session info.


License

GPL (≥ 2)


Contact

Daniel J. Stekhoven — stekhoven@nexus.ethz.ch


--- Tranlated By Open Ai Tx | Last indexed: 2026-07-17 ---