Documentaton - BLOCKS - BLOCK_DICTIONARY

This block learns a dictionary from a database and a set of features.

BK = BLOCK_DICTIONARY() Initializes the block with the default options.

BK = BLOCK_DICTIONARY(BK) Executes the block with options and inputs BK.

Required Inputs:

db

The partitioned database.

feat

Features extracted on the partitioned database.

Options:

bk.dictionary

The type of dictionary to create. Supported types: ikm: Integer k-means hikm: Hierarchical Integer k-means

bk.nfeats

The maximum number of features to sample for training. Default 1000 features.

bk.rand_seed

Set the random seed before proceeding. Default [] does not change the random seeds.

bk.ntrials

The number of trials to run.

bk.split

How many processes to use. Default 0.

bk.seg_ids

The segment ids to use for training. The default of [] will select all of the data marked as training in the database.

IKM options:

bk.ikm_nwords

Number of visual words generated for each category. If IKM_AT_ONCE is activated, this parameter is instead the total number of visual words.

bk.ikm_at_once

Train a single dictionary, instead of one for each category.

Hierarchical IKM options:

bk.hikm_k

The branching factor of the HIKM tree.

bk.hikm_nleaves

The number of leaf nodes in the HIKM tree.

bk.hikm_only_leaves

Push works as if only the leaves of the tree existed.

Block functions:

push

[WORDS,HIST,SEL] = PUSH(DICT, DATA) pushes the data through the dictionary. sel indexes which data items correspond to which words.