
Last chance! 50% off unlimited learning
Sale ends in
Dictionary initialization using the Compressive Orthogonal Matching Pursuit (COMP) method
COMP_initialization(
K,
Data,
SK_Data = NULL,
Frequencies = NULL,
lower = -Inf,
upper = Inf,
maxIter = 1500,
HardThreshold = FALSE,
print_level = 0,
ncores = 1,
m = nrow(Frequencies),
...
)
is a dictionary size.
is a Filebacked Big Matrix
is a data sketch. It is a Sketch
function of
chickn package.
is a frequency matrix GenerateFrequencies
function of chickn package.
is a lower boundary. It is an
is an upper boundary. It is an
is a maximum number of iterations in the computation of new dictionary element. The default value is 1500.
indicates whether to execute the hard thresholding step. The default is FALSE.
controls how much output is shown during the optimization process. Possible values:
0 no output (default value)
1 show iteration number and value of objective function
2 1 + show values of weights
is a number of cores. The default value is 1.
is a number of the frequency vectors.
are additional parameters passed to GenerateFrequencies function.
a list
D
is the obtained dictionary,
weights
is the resulting weights,
ObjF
is the objective function values computed at each iteration.
Sketch
is the data sketch
Frequencies
is the frequency matrix
The initialization routine is based on the Compressive Orthogonal Matching Pursuit
(COMP) algorithm.
COMP is an iterative greedy method that builds a dictionary operating on a
compressed data version (a.k.a. data sketch).
It alternates between expanding the dictionary
ObjFun_COMP_cpp
, Gradient_COMP_cpp
,
chickn::Sketch
, chickn::GenerateFrequencies
, chickn
# NOT RUN {
X = matrix(abs(rnorm(n = 1000)), ncol = 100, nrow = 10)
lb = apply(X, 1, min)
ub = apply(X, 1, max)
X_fbm = bigstatsr::FBM(init = X, ncol = ncol(X), nrow = nrow(X))
m = 64
W = chickn::GenerateFrequencies(Data = X_fbm, m = m, N0 = ncol(X_fbm),
ncores = 1, niter= 3, nblocks = 2, sigma_start = 0.001)$W
SK= chickn::Sketch(X_fbm, W)
D0 = COMP_initialization(K = 10, Data = X_fbm, SK_Data = SK, Frequencies = W,
lower = lb, upper = ub)$Dictionary
# }
Run the code above in your browser using DataLab