NuclearNormMatrixCompletion
Guide & worked example · Source
NuclearNormMatrixCompletion(
lambda_L=None,
lambda_fraction=0.25,
fit_unit_effects=True,
fit_time_effects=True,
maxiter=500,
effect_iters=2,
tol=1e-06,
device=None,
)Nuclear-norm penalized matrix completion with additive fixed effects.
Solves
min_{L,u,v} |Omega|^{-1} ||P_Omega(Y - L - u1' - 1v')||_F^2
+ lambda_L ||L||_*
by alternating least-squares updates for the additive effects with the SVT projection update from MCPanel. The implementation is dense and pure torch, so it runs on CPU or GPU and is intended as a clean scalable baseline.
Attributes
| Name | Description |
|---|---|
device |
|
effect_iters |
|
fit_time_effects |
|
fit_unit_effects |
|
history |
|
lambda_L |
|
lambda_fraction |
|
maxiter |
|
params |
|
tol |
Methods
| Name | Description |
|---|---|
| fit | |
| predict | |
| summary | Print a summary of the model results. |
| to | Move all model parameters to specified device. |
fit
NuclearNormMatrixCompletion.fit(Y, mask=None)predict
NuclearNormMatrixCompletion.predict()summary
NuclearNormMatrixCompletion.summary()Print a summary of the model results.
to
NuclearNormMatrixCompletion.to(device)Move all model parameters to specified device.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| device | torch.device or str | Target device (‘cuda’, ‘cpu’, etc.) | required |
Returns
| Name | Type | Description |
|---|---|---|
| BaseEstimator | Self for method chaining |