주어진 주성분 분해 결과를 이용하여 새 데이터에 대해 주성분 스코어를 계산한다.

predict_pca(.fit, .new_data)

Arguments

.fit

주성분 분해 결과.

.new_data

새 관측 데이터 프레임.

Value

주성분 스코어 데이터프레임.

Examples

data(biometric, package = "dmtr") fit <- fit_pca(biometric, .pc = 2L) predict_pca(fit, biometric)
#> # A tibble: 10 × 2 #> PC1 PC2 #> <dbl> <dbl> #> 1 -1.27 -0.280 #> 2 0.249 1.50 #> 3 0.617 -0.334 #> 4 -2.82 0.610 #> 5 1.72 1.51 #> 6 1.06 -1.76 #> 7 0.187 0.345 #> 8 -0.937 -0.876 #> 9 0.595 0.432 #> 10 0.594 -1.15