pyproteonet.imputation.sklearn.generic_matrix_imputation
- pyproteonet.imputation.sklearn.generic_matrix_imputation(dataset: Dataset, molecule: str, column: str, imputation_function: Callable[[ndarray], ndarray], transpose: bool = False, result_column: str | None = None, **kwargs) Series
Apply a scikit-learn matrix imputer to a dataset.
- Parameters:
dataset (Dataset) – Dataset to impute.
molecule (str) – Molecule type to impute (e.g. protein, peptide etc.).
column (str) – Name of the value column to impute.
imputation_function (Callable[[np.ndarray], np.ndarray]) – Impute function working on a 2d numpy array.
transpose (bool, optional) – Whether to transpose the matrix before imputation. Defaults to False.
result_column (Optional[str], optional) – If given, name of the value column to store the imputed values in. Defaults to None.
- Returns:
The imputed values.
- Return type:
pd.Series