More stuff. Good stuff.

parent 0aec2032
......@@ -17,26 +17,28 @@ ml_algorithm_t learn_model_inner = learn_model_traditional;
mi_algorithm_t mi_algorithm_catalog[] = {
initialize_dictionary_neighbor,
initialize_dictionary_partition,
initialize_dictionary_sdct,
initialize_dictionary_sdct2d,
initialize_dictionary_hamming,
initialize_dictionary_random,
initialize_dictionary_samples,
initialize_dictionary_partition,
initialize_dictionary_sdct,
initialize_dictionary_sdct2d,
initialize_dictionary_hamming,
initialize_dictionary_random,
initialize_dictionary_samples,
initialize_dictionary_coverage,
initialize_dictionary_normalized_coverage,
initialize_dictionary_tile_layers,
0};
const char* mi_algorithm_names[] = {
"Neighbor initialization",
"Partition initialization",
"Neighbor",
"Partition",
"sign of DCT" ,
" sign of 2D DCT",
"Hamming basis",
"purely random dictionary",
"random samples from data",
"Coverage initialization",
"Normalized coverage initialization",
"Coverage",
"Normalized coverage",
"tile layers",
0
};
......
This diff is collapsed.
......@@ -3,13 +3,66 @@
#include "binmat.h"
/**
* Initializes both D and A to 'cover' most of the ones.
* Two vectors u and v are initialized to the rows and columns
* Then, for each k, the pair Dk,Ak is defined so that they have
* an 1 where u (respectively v) are nonzero, and the corresponding value
* in u and v are decreased by the minimum non-zero value in each vector
* (until they reach zero).
*
* Example.
* |456254055423 v
* -+------------
* 5|010011011100
* 6|100110011100
* 3|110000010000
* 8|010011011111
* 8|110011011011
* 9|110111011101
* u
*
* The first pair of atoms would be
*
* A1 = 111111 D1=111111011111
*
* and u and v are updated as
* |234032033201 v
* -+------------
* 2|010011011100
* 3|100110011100
* 0|110000010000
* 5|010011011111
* 5|110011011011
* 6|110111011101
*
* A2 = 110111 D2=111011011101
*
* |123021022100 v
* -+------------
* 0|010011011100
* 1|100110011100
* 0|110000010000
* 3|010011011111
* 3|110011011011
* 4|110111011101
*
* A3 = 010111 D2=111011011100
*/
void initialize_dictionary_tile_layers(
const binary_matrix& E,
const binary_matrix& H,
binary_matrix& D,
binary_matrix& A);
/**
* Initialize dictionary to the K samples that cover most of
* the ones in the rest of the data. This does not take
* into account the weight of the sample, so an all 1's will
* always win here.
*/
void initialize_dictionary_coverage(const binary_matrix& E,
void initialize_dictionary_coverage(
const binary_matrix& E,
const binary_matrix& H,
binary_matrix& D,
binary_matrix& A);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment