Arguments
X A d x n matrix of n training samples with d features.
y A vector of length n of training labels. The element of y is either -1 or 1.
但是,文档中的例子
library(DWDLargeR)
data("mushrooms")
# calculate the best penalty parameter
C = penaltyParameter(mushrooms$X,mushrooms$y,expon=1)
# solve the generalized DWD model
result = genDWD(mushrooms$X,mushrooms$y,C,expon=1)
但是其中mushrooms$X结构如下:
用矩阵做参数x时,运行该函数
在该函数里的语句
nnz = sum(X@ra != 0)会报错。
因为输入矩阵里没有@ra部分?
难道该软件包只是为mushrooms这个特定数据设计的?