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

📄 train_bootstrap_snn.m

📁 神经网络的工具箱, 神经网络的工具箱,
💻 M
字号:
function [net, tr_info, dataset] = train_bootstrap_snn(net, data, blocksize)%TRAIN_BOOTSTRAP_SNN Train network on bootstrapped sample of input data%%  Syntax%%   [net, tr_info, dataset] = train_bootstrap_snn(net, wcf_data)%%  Description%%   TRAIN_BOOTSTRAP_SNN takes%     net       - a net_struct with cost function WCF_SNN.%     wcf_data  - a wcfdata_struct containing the input data set.%   and returns%     net       - a net_struct containing a network trained on %                 training and validation data, which are obtained by%                 bootstrapping on the input data set.%     tr_info   - a structure containing information about the%                 training process.%     dataset   - a structure with information about the subdivision %                 of input data in training and validation set.%%  See also%%   TRAIN_HALFOUT_SNN%if (nargin < 3)   blocksize = 1;endif strcmp(net.costFcn.name, 'wcf_snn')   q = size(data.P,2)/blocksize;   [ind_block_LV, ind_block_VV] = randboot_snn(q);   n_block_LV = prod(size(ind_block_LV));   n_block_VV = prod(size(ind_block_VV));   ind_LV = blocksize * (reshape(...               repmat(reshape(ind_block_LV,1,n_block_LV),blocksize,1), ...               1, n_block_LV*blocksize) - 1) ...            + repmat([1:blocksize], 1, n_block_LV);   ind_VV = blocksize * (reshape(...               repmat(reshape(ind_block_VV,1,n_block_VV),blocksize,1), ...               1, n_block_VV*blocksize) - 1) ...            + repmat([1:blocksize], 1, n_block_VV);   dataLV = subset_wcfdata_snn(data, ind_LV);   dataVV = subset_wcfdata_snn(data, ind_VV);   dataset.trg_ind = ind_LV;   dataset.val_ind = ind_VV;   dataset.data = data;   [net, tr_info] = train_snn(net, dataLV, dataVV);else   errtext = sprintf(...          'TRAIN_BOOTSTRAP_SNN: Do not know how to subdivide data for %s.', ...          net.costFcn.name);   error(errtext);end

⌨️ 快捷键说明

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