preprocessor.data_trimmer package¶
Submodules¶
preprocessor.data_trimmer.data_trimmer module¶
This File contains the DataTrimmer class. To run this script uncomment or add the following lines in the [options.entry_points] section in setup.cfg:
- console_scripts =
- data-trimmer = data_trimmer.__main__:main
Then run python setup.py install which will install the command data-trimmer inside your current environment.
-
class
preprocessor.data_trimmer.data_trimmer.
DataTrimmer
(conf)[source]¶ Bases:
preprocessor.preprocessor.Preprocessor
The Data Trimmer preprocessor class
-
core
()[source]¶ - Core preprocessor task after starting the instance with the main method.
- Decide from the arguments, what trimming method to call.
Args: args (obj): command line parameters as objects
-
parse_args
(args)[source]¶ Parse command line parameters
Parameters: args ([str]) – command line parameters as list of strings Returns: command line parameters namespace Return type: argparse.Namespace
-
trim_auto
()[source]¶ Trims all the constant columns and trims all rows with consecutive zeroes from start and end of the input dataset
Returns: rows_t, cols_t (int,int): number of rows and columns trimmed
-
trim_columns
()[source]¶ Trims all the constant columns from the input dataset
Returns: number of rows and columns trimmed Return type: rows_t, cols_t (int,int)
-