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

📄 art_add_new_category.m

📁 ART 神经网络Matlab代码。包括数据产生函数
💻 M
字号:
function resizedWeight = ART_Add_New_Category(weight)
% ART_Add_New_Category    Adds a new category to the given weight matrix.
%    RESIZEDWEIGHT = ART_Add_New_Category(WEIGHT)
%    This function returns a new weight matrix which is identical to the
%    given weight matrix except that it contains one more category which
%    is initialized to all 1's.
% 
%    The input parameter is as follows:
%    The WEIGHT is a matrix of size NumFeatures-by-NumCategories which
%    holds the weights of the network.
%
%    The return parameter is as follows:
%    The RESIZEDWEIGHT is a matrix of size NumFeatures-by-NumCategories+1
%    which holds the weights of the old matrix plus a new category of all
%    values of 1.


% Make sure that the user specified the weight matrix.
if(nargin ~= 1)
    error('You must specify the weight matrix parameter.');    
end

% Create the return weight matrix with the right dimensions.
[numFeatures, numCategories] = size(weight);
newCategory = ones(numFeatures, 1);
resizedWeight = [weight, newCategory];


return

⌨️ 快捷键说明

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