Fits a CP model by minimizing the sum of an arbitrary elementwise loss
f(x, m) between the data and the model with L-BFGS-B, mirroring the
dense/deterministic mode of the MATLAB Tensor Toolbox gcp_opt.
Usage
gcp_opt(
X,
R,
type = "gaussian",
init = "random",
maxiters = 500L,
factr = 1e+07,
printitn = 0L
)Arguments
- X
A Tensor or array-like object.
- R
Target CP rank.
- type
Loss name: one of
"gaussian"(alias"normal"),"poisson"(alias"count"),"poisson-log","bernoulli-odds","bernoulli-logit","rayleigh","gamma","huber". Alternatively a list with elementsf(x, m),g(x, m)(the derivative inm), andlower(factor lower bound,-Infif unconstrained) for a custom loss.- init
"random","nvecs", or a list of initial factor matrices.- maxiters
Maximum optimizer iterations (default
500).- factr
optimL-BFGS-Bfactrconvergence parameter.- printitn
If positive, print the optimizer trace.