如何在R的MASS包中找到lda()函数使用的切点值?

如何在R的MASS包中找到lda()函数使用的切点值?,r,R,我正在使用R中的MASS包,特别是lda()函数。我想知道如何让R返回LD1的阈值(即切割点或切割点),lda函数使用该阈值来确定每个样本应分配给哪个组或类别 我知道R不只是使用两组平均值之间的中点来表示LD1。我需要知道切点值,以便我可以运行多个迭代的lda,并在每次新迭代之前重新分配错误分类的样本。除非您强制执行,否则它将取决于数据?lda产生: prior the prior probabilities of class membership. If unspecified, the

我正在使用
R
中的
MASS
包,特别是
lda()
函数。我想知道如何让R返回
LD1
的阈值(即切割点或切割点),lda函数使用该阈值来确定每个样本应分配给哪个组或类别


我知道R不只是使用两组平均值之间的中点来表示
LD1
。我需要知道切点值,以便我可以运行多个迭代的
lda
,并在每次新迭代之前重新分配错误分类的样本。

除非您强制执行,否则它将取决于数据<代码>?lda产生:

prior   
the prior probabilities of class membership. If unspecified, the class proportions for 
the training set are used. If present, the probabilities should be specified in the 
order of the factor levels.
如果要查看代码或生成预测,请查看
predict.lda
,或进一步阅读
?predict.lda
和MASS book
predict.lda
还提供了一个指定切入点的句柄:

prior   
The prior probabilities of the classes, by default the proportions in the training set
 or what was set in the call to lda.