.\" Text automatically generated by txt2man .TH mlpack_preprocess_binarize 1 "12 December 2020" "mlpack-3.4.2" "User Commands" .SH NAME \fBmlpack_preprocess_binarize \fP- binarize data .SH SYNOPSIS .nf .fam C \fBmlpack_preprocess_binarize\fP \fB-i\fP \fIstring\fP [\fB-d\fP \fIint\fP] [\fB-t\fP \fIdouble\fP] [\fB-V\fP \fIbool\fP] [\fB-o\fP \fIstring\fP] [\fB-h\fP \fB-v\fP] .fam T .fi .fam T .fi .SH DESCRIPTION This utility takes a dataset and binarizes the variables into either 0 or 1 given threshold. User can apply binarization on a dimension or the whole dataset. The dimension to apply binarization to can be specified using the \(cq\fB--dimension\fP (\fB-d\fP)' parameter; if left unspecified, every dimension will be binarized. The threshold for binarization can also be specified with the \(cq\fB--threshold\fP (\fB-t\fP)' parameter; the default threshold is 0.0. .PP The binarized matrix may be saved with the '\fB--output_file\fP (\fB-o\fP)' output parameter. .PP For example, if we want to set all variables greater than 5 in the dataset \(cqX.csv' to 1 and variables less than or equal to 5.0 to 0, and save the result to 'Y.csv', we could run .PP $ \fBmlpack_preprocess_binarize\fP \fB--input_file\fP X.csv \fB--threshold\fP 5 \fB--output_file\fP Y.csv .PP But if we want to apply this to only the first (0th) dimension of 'X.csv', we could instead run .PP $ \fBmlpack_preprocess_binarize\fP \fB--input_file\fP X.csv \fB--threshold\fP 5 \fB--dimension\fP 0 \fB--output_file\fP Y.csv .RE .PP .SH REQUIRED INPUT OPTIONS .TP .B \fB--input_file\fP (\fB-i\fP) [\fIstring\fP] Input data matrix. .SH OPTIONAL INPUT OPTIONS .TP .B \fB--dimension\fP (\fB-d\fP) [\fIint\fP] Dimension to apply the binarization. If not set, the program will binarize every dimension by default. Default value 0. .TP .B \fB--help\fP (\fB-h\fP) [\fIbool\fP] Default help info. .TP .B \fB--info\fP [\fIstring\fP] Print help on a specific option. Default value ''. .TP .B \fB--threshold\fP (\fB-t\fP) [\fIdouble\fP] Threshold to be applied for binarization. If not set, the threshold defaults to 0.0. Default value 0. .TP .B \fB--verbose\fP (\fB-v\fP) [\fIbool\fP] Display informational messages and the full list of parameters and timers at the end of execution. .TP .B \fB--version\fP (\fB-V\fP) [\fIbool\fP] Display the version of mlpack. .SH OPTIONAL OUTPUT OPTIONS .TP .B \fB--output_file\fP (\fB-o\fP) [\fIstring\fP] Matrix in which to save the output. .SH 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.