mlpack
Functions
preprocess_binarize_main.cpp File Reference
#include <mlpack/prereqs.hpp>
#include <mlpack/core/util/io.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
#include <mlpack/core/data/binarize.hpp>
Include dependency graph for preprocess_binarize_main.cpp:
This graph shows which files directly or indirectly include this file:

Functions

 BINDING_NAME ("Binarize Data")
 
 BINDING_SHORT_DESC ("A utility to binarize a dataset. Given a dataset, this utility converts " "each value in the desired dimension(s) to 0 or 1; this can be a useful " "preprocessing step.")
 
 BINDING_LONG_DESC ("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 "+PRINT_PARAM_STRING("dimension")+" parameter; if left unspecified, every dimension will be binarized. The " "threshold for binarization can also be specified with the "+PRINT_PARAM_STRING("threshold")+" parameter; the default threshold is " "0.0." "\" "The binarized matrix may be saved with the "+PRINT_PARAM_STRING("output")+" output parameter.")
 
 BINDING_EXAMPLE ("For example, if we want to set all variables greater than 5 in the " "dataset "+PRINT_DATASET("X")+" to 1 and variables less than or equal " "to 5.0 to 0, and save the result to "+PRINT_DATASET("Y")+", we could " "run" "\"+PRINT_CALL("preprocess_binarize", "input", "X", "threshold", 5.0, "output", "Y")+"\" "But if we want to apply this to only the first (0th) dimension of "+PRINT_DATASET("X")+", we could instead run" "\"+PRINT_CALL("preprocess_binarize", "input", "X", "threshold", 5.0, "dimension", 0, "output", "Y"))
 
 BINDING_SEE_ALSO ("@preprocess_describe", "#preprocess_describe")
 
 BINDING_SEE_ALSO ("@preprocess_imputer", "#preprocess_imputer")
 
 BINDING_SEE_ALSO ("@preprocess_split", "#preprocess_split")
 
 PARAM_MATRIX_IN_REQ ("input", "Input data matrix.", "i")
 
 PARAM_MATRIX_OUT ("output", "Matrix in which to save the output.", "o")
 
 PARAM_INT_IN ("dimension", "Dimension to apply the binarization. If not set, the" " program will binarize every dimension by default.", "d", 0)
 
 PARAM_DOUBLE_IN ("threshold", "Threshold to be applied for binarization. If not " "set, the threshold defaults to 0.0.", "t", 0.0)
 

Detailed Description

Author
Keon Kim

A binding to binarize a dataset.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.