⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nnet.hess.html

📁 本程序是基于linux系统下c++代码
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Evaluates Hessian for a Neural Network</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>

<table width="100%" summary="page for nnetHess {nnet}"><tr><td>nnetHess {nnet}</td><td align="right">R Documentation</td></tr></table>
<h2>Evaluates Hessian for a Neural Network</h2>


<h3>Description</h3>

<p>
Evaluates the Hessian (matrix of second derivatives) of the specified
neural network. Normally called via argument <code>Hess=TRUE</code> to <code>nnet</code> or via
<code>vcov.multinom</code>.
</p>


<h3>Usage</h3>

<pre>
nnetHess(net, x, y, weights)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>net</code></td>
<td>
object of class <code>nnet</code> as returned by <code>nnet</code>.
</td></tr>
<tr valign="top"><td><code>x</code></td>
<td>
training data.
</td></tr>
<tr valign="top"><td><code>y</code></td>
<td>
classes for training data.
</td></tr>
<tr valign="top"><td><code>weights</code></td>
<td>
the (case) weights used in the <code>nnet</code> fit.
</td></tr>
</table>

<h3>Value</h3>

<p>
square symmetric matrix of the Hessian evaluated at the weights stored
in the net.</p>

<h3>References</h3>

<p>
Ripley, B. D. (1996)
<EM>Pattern Recognition and Neural Networks.</EM> Cambridge.
</p>
<p>
Venables, W. N. and Ripley, B. D. (2002)
<EM>Modern Applied Statistics with S.</EM> Fourth edition.  Springer.
</p>


<h3>See Also</h3>

<p>
<code><a href="nnet.html">nnet</a></code>, <code><a href="predict.nnet.html">predict.nnet</a></code>
</p>


<h3>Examples</h3>

<pre>
data(iris3)
# use half the iris data
ir &lt;- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
targets &lt;- 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 &lt;- c(sample(1:50,25), sample(51:100,25), sample(101:150,25))
ir1 &lt;- nnet(ir[samp,], targets[samp,], size=2, rang=0.1, decay=5e-4, maxit=200)
eigen(nnetHess(ir1, ir[samp,], targets[samp,]), TRUE)$values
</pre>



<hr><div align="center">[Package <em>nnet</em> version 7.2-44 <a href="00Index.html">Index]</a></div>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -