MATLAB 帮助中心
绘制网络性能图
plotperform(TR)
plotperform(TR) 基于函数 train 所返回的训练记录 TR 绘制训练、验证和测试性能的误差对轮数的图。
TR
train
示例
全部折叠
此示例说明如何使用 plotperform 获得训练记录误差值对训练轮数的图。
plotperform
[x,t] = bodyfat_dataset; net = feedforwardnet(10); [net,tr] = train(net,x,t);
plotperform(tr)
一般情况下,经过更多轮数的训练后,误差会减小,但随着网络开始过拟合训练数据,基于验证数据集的误差可能会开始增大。在默认设置中,在验证误差连续六次增大后,训练将停止,最优性能取自验证误差最低的那一轮训练。
训练记录(epoch 和 perf),以结构体形式返回,其字段取决于网络训练函数 (net.NET.trainFcn)。它可以包括如下字段:
epoch
perf
net.NET.trainFcn
训练、数据划分以及性能函数和参数
训练、验证和测试集的数据划分索引
训练、验证和测试集的数据划分掩码
轮数 (num_epochs) 和最佳轮次 (best_epoch)
num_epochs
best_epoch
训练状态名称列表 (states)
states
每个状态名称的字段(在整个训练过程中记录其值)
最佳网络的性能(best_perf、best_vperf、best_tperf)
best_perf
best_vperf
best_tperf
在 R2008a 中推出
plottrainstate
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处