fn_make_evidence

[evidence] = fn_make_evidence(featureMat, node_idx_field, tree_struc, param);

Description

The function takes as an input the feature matrix, node index and the connectivities and outputs the evidence cell array, each row of which representing a feature vector.

Output

evidence: A N_total_node_idx x 1 cell array, each row of which representing the feature vector. Note that we use cell array because each level does not necessarily have the same dimensionality which makes the algorithm more flexible on multiscale features.

Input

featureMat: N_row x N_col x F image feature matrix, the output from the function fn_extract_feature_image2.

node_idx_field: A N_row x N_col x N_total_hid_level each stack is the field of node indices, namely superpixel + offset.

tree_struc: The connectivity matrix, the same format as the output tree_struc from the function fn_make_tree_structure.

param: Some crucial parameters needed for the function

field names

N_hidden

N_evidence

description

Total number of the hidden nodes in the network

Total number of the evidence nodes in the network

Example

% Make evidence for the evidence nodes

param = {};

param.N_hidden = tree_info.N_hidden;

param.N_evidence = tree_info.N_evidence;

% make node index cell

node_idx_field = cell(N_total_hid_level,1);

for l = 1:N_total_hid_level

supx_idx_field = tree_struc_detail(l).idx_field;

node_idx_field{l} = supx_idx_field + (supx_idx_field~=0)*tree_struc_detail(l).offset;

end

evidence_cell = fn_make_evidence(featureMat, node_idx_field, tree_struc, param);