【发布时间】:2020-12-16 00:09:28
【问题描述】:
对不起,混乱的标题。我不确定这个措辞是否正确。
我有以下情况。 SelfLearning() 有 method 参数,它是一个函数。我想要method=LibLinear 并且我想包含LibLinear 本身的参数,即参数type=2。我不知道该怎么做。
如何让 B 之类的东西工作?
library(RSSL)
library(dplyr)
library(ggplot2)
# dummy dataset
df <- generate2ClassGaussian(200, d=2, var = 0.2, expected=TRUE)
# A
# this works, but without LibLinear(type=2)
g_self <- SelfLearning(Class~.,df,
method = NearestMeanClassifier,
prior=matrix(0.5,2))
# B
# trying to pass method=LibLinear(type=2) does not work
g_self <- SelfLearning(Class~.,df,
method = LiblineaR(type=2), # <-- how do I fix this?
prior=matrix(0.5,2))
【问题讨论】: