R刺钉:无效的下标类型“列表”,下标超出范围

时间:2019-03-21 15:10:18

标签: r feature-selection

我正在尝试使用R中的stabs包执行稳定性选择。我没有二进制标签向量,因此我尝试使用多项式回归。

stab <- stabsel(x = X, y = y, 
            fitfun = glmnet.lasso,
            args.fitfun = list(family="multinomial"),
            cutoff = 0.6, 
            sampling.type = 'SS',
            assumption = 'r-concave',
            PFER = 5 # false positives
            )

我收到以下错误:

100 fold(s) encountered an error. Results are based on 0 folds only.
Original error message(s):
Error in ret[selected] <- TRUE : invalid subscript type 'list'
Error in res[[1]] : subscript out of bounds

运行追溯时,我得到:

3.run_stabsel(fitter = fit_model, args.fitter = args.fitfun, n = n, p = p, cutoff = cutoff, q = q, PFER = PFER, folds = folds, B = B, assumption = assumption, sampling.type = sampling.type, papply = papply, verbose = verbose, FWER = FWER, eval = eval, ...
2.stabsel.matrix(x = X, y = y, fitfun = glmnet.lasso, args.fitfun = list(family = "multinomial"), cutoff = 0.6, sampling.type = "SS", assumption = "r-concave", PFER = 5)
1.stabsel(x = X, y = y, fitfun = glmnet.lasso, args.fitfun = list(family = "multinomial"), cutoff = 0.6, sampling.type = "SS", assumption = "r-concave", PFER = 5)

我不知道我在哪里使用列表作为下标。有人知道如何解决这个问题吗?

0 个答案:

没有答案