| mlpack_preprocess_imputer(1) | User Commands | mlpack_preprocess_imputer(1) |
NAME¶
mlpack_preprocess_imputer - impute data
SYNOPSIS¶
mlpack_preprocess_imputer -s string [-c double] [-d int] [-i unknown] [-m double] [-V bool] [-o unknown] [-h -v]
DESCRIPTION¶
This utility takes a dataset and converts a user-defined missing variable to another to provide more meaningful analysis.
The program does not modify the original matrix, but instead makes a separate matrix for the output, via the '--output_file (-o)'option.
For example, if we consider NaN values in dimension 0 to be a missing variable and want to delete whole data point if it contains a NaN in the column-wise'dataset.csv', we could run:
$ mlpack_preprocess_imputer --input_file dataset.csv --output_file result.csv --dimension 0 --strategy listwise_deletion
REQUIRED INPUT OPTIONS¶
- --strategy (-s) [string]
- imputation strategy to be applied. Strategies should be one of 'custom', 'mean', 'median', and 'listwise_deletion'.
OPTIONAL INPUT OPTIONS¶
--custom_value (-c) [double] User-defined custom imputation value; only used if the strategy is 'custom'. Default value 0.
- --dimension (-d) [int]
- The dimension to apply imputation to. If not specified, missing values will be imputed in every dimension. Default value 0.
- --help (-h) [bool]
- Default help info.
- --info [string]
- Print help on a specific option. Default value ''.
- --input_file (-i) [unknown]
- Input matrix to impute values for.
- --missing_value (-m) [double]
- Value to use to indicate missing elements that will be imputed. Default value nan.
- --verbose (-v) [bool]
- Display informational messages and the full list of parameters and timers at the end of execution.
- --version (-V) [bool]
- Display the version of mlpack.
OPTIONAL OUTPUT OPTIONS¶
--output_file (-o) [unknown] Matrix to output that will have imputed values.
ADDITIONAL INFORMATION¶
For further information, including relevant papers, citations, and theory, consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack.
| 05 February 2026 | mlpack-4.7.0 |