R語言
nnetHess
位於 nnet
包(package)。 說明
評估指定神經網絡的 Hessian(二階導數矩陣)。通常通過參數 Hess=TRUE
到 nnet
或通過 vcov.multinom
調用。
用法
nnetHess(net, x, y, weights)
參數
net |
|
x |
訓練數據。 |
y |
訓練數據的類。 |
weights |
|
值
根據網絡中存儲的權重計算的 Hessian 矩陣的對稱方陣。
例子
# use half the iris data
ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
targets <- matrix(c(rep(c(1,0,0),50), rep(c(0,1,0),50), rep(c(0,0,1),50)),
150, 3, byrow=TRUE)
samp <- c(sample(1:50,25), sample(51:100,25), sample(101:150,25))
ir1 <- nnet(ir[samp,], targets[samp,], size=2, rang=0.1, decay=5e-4, maxit=200)
eigen(nnetHess(ir1, ir[samp,], targets[samp,]), TRUE)$values
參考
Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
也可以看看
相關用法
- R nnet 擬合神經網絡
- R which.is.max 求向量中的最大位置
- R predict.nnet 通過訓練有素的神經網絡預測新示例
- R class.ind 從因子生成類別指標矩陣
- R multinom 擬合多項對數線性模型
- R Pixel X 射線像素強度隨時間的變化
- R corARMA ARMA(p,q) 相關結構
- R getGroupsFormula 提取分組公式
- R corRatio 有理二次相關結構
- R logLik.glsStruct glsStruct 對象的對數似然
- R intervals.lmList lmList 係數的置信區間
- R corLin 線性相關結構
- R plot.augPred 繪製 augPred 對象
- R print.varFunc 打印 varFunc 對象
- R recalc 重新計算壓縮線性模型對象
- R Variogram.corSpher 計算 corSpher 對象的半變異函數
- R getGroups.lme 提取 lme 對象組
- R nlmeStruct 非線性混合效應結構
- R predict.nlme 來自 nlme 對象的預測
- R corSymm 一般相關結構
- R qqnorm.gls gls 對象殘差的正態圖
- R pdCompSymm 具有複合對稱結構的正定矩陣
- R [.pdMat 下標 pdMat 對象
- R pdConstruct.pdBlocked 構造 pdBlocked 對象
- R gapply 按組應用函數
注:本文由純淨天空篩選整理自R-devel大神的英文原創作品 Evaluates Hessian for a Neural Network。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。