qolmat.imputations.imputers.ImputerSoftImpute

class qolmat.imputations.imputers.ImputerSoftImpute(groups: Tuple[str, ...] = (), columnwise: bool = False, random_state: Optional[Union[int, RandomState]] = None, period: int = 1, rank: Optional[int] = None, tolerance: float = 1e-05, tau: Optional[float] = None, max_iterations: int = 100, verbose: bool = False)[source]

SoftImpute imputer.

This class implements the Soft Impute method: Hastie, Trevor, et al. Matrix completion and low-rank SVD via fast alternating least squares. The Journal of Machine Learning Research 16.1 (2015): 3367-3402.

This imputation technique is less robust than the RPCA, although it can provide faster.

Parameters
groups: Tuple[str, …]

List of column names to group by, by default []

columnwisebool

For the RPCA method to be applied columnwise (with reshaping of each column into an array) or to be applied directly on the dataframe. By default, the value is set to False.

random_stateRandomSetting, optional

Controls the randomness of the fit_transform, by default None

__init__(groups: Tuple[str, ...] = (), columnwise: bool = False, random_state: Optional[Union[int, RandomState]] = None, period: int = 1, rank: Optional[int] = None, tolerance: float = 1e-05, tau: Optional[float] = None, max_iterations: int = 100, verbose: bool = False)[source]
get_model(**hyperparams) SoftImpute[source]

Get the underlying model of the imputer based on its attributes.

Returns
softimpute.SoftImpute

Soft Impute model to be used in the transform method.