[英]train() error with method = “QDA” and value = “finalModel”
I ran the train()
with method = "lda" value = "finalModel"
without errors to completion, changed to method = "qda"
and I get errors... I am working on Generative Models. 我使用
method = "lda" value = "finalModel"
来运行train()
,没有错误完成,更改为method = "qda"
,但出现错误...我正在method = "qda"
模型。
library(dslabs)
library(caret)
data("tissue_gene_expression")
set.seed(1993)
y <- tissue_gene_expression$y
x <- tissue_gene_expression$x
x <- x[, sample(ncol(x), 10)]
fit_qda <- train(x, y, method = "qda", value = "finalModel")
fit_qda$results
I should get TWO genes to drive the algorithm... 我应该得到两个基因来驱动算法...
I am getting: 我正进入(状态:
Something is wrong;
出了点问题; all the Accuracy metric values are missing: Error: Stopping
所有精度指标值均丢失:错误:正在停止
Neither train()
nor MASS::qda()
have a value
argument. train()
和MASS::qda()
都没有value
参数。
If you look, your code gives warnings: 如果您看一下,您的代码会发出警告:
Error: Stopping
In addition: There were 26 warnings (use warnings() to see them)
The warnings are: 警告是:
some group is too small for 'qda'
QDA needs to be able to compute a full (non-singular) covariance matrix within each class and you don't have enough data (relative to your predictors) to do that in this examples QDA需要能够计算每个类中的完整(非奇异)协方差矩阵,并且在此示例中,您没有足够的数据(相对于预测变量)来执行此操作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.