分类和回归的损失函数。
用法
  expLoss(beta = 1, ...)
  hingeLoss(margin = 1, ...)
  logLoss(...)
  smoothHingeLoss(smoothingConst = 1, ...)
  poissonLoss(...)
  squaredLoss(...)
参数
beta
指定 beta (dilation) 的数值。 默认值为 1。
margin
指定数值边距值。 默认值为 1。
smoothingConst
指定平滑常数的数值。 默认值为 1。
 ...
隐藏参数。
详细信息
损失函数衡量机器学习算法的预测值与监督的输出之间的差异,并表示出错的代价。
支持的分类损失函数包括:
logLoss
expLoss
hingeLoss
smoothHingeLoss
支持的回归损失函数包括:
poissonLoss
              squaredLoss.
值
定义损失函数的字符串。
作者
Microsoft Corporation Microsoft Technical Support
另请参阅
示例
 train <- function(lossFunction) {
     result <- rxFastLinear(isCase ~ age + parity + education + spontaneous + induced,
                   transforms = list(isCase = case == 1), lossFunction = lossFunction,
                   data = infert,
                   type = "binary")
     coef(result)[["age"]]
 }
 age <- list()
 age$LogLoss <- train(logLoss())
 age$LogLossHinge <- train(hingeLoss())
 age$LogLossSmoothHinge <- train(smoothHingeLoss())
 age