R語言 最優子集選擇與K折交叉驗證

R語言 最優子集選擇(Best subset selection) 與K折交叉驗證(K-fold cross validation) ## 最優子集選擇 best_subset_selection <- function(X, Y, Nfolds){ # 生成所有可能的組合 m <- ncol(X) idx <- 1:(2^m-1) t <- vector() mat <- sa
相關文章
相關標籤/搜索