conmo.preprocesses.preprocess.Preprocess
- class conmo.preprocesses.preprocess.Preprocess[source]
Abstract base class for a Preprocess.
This class is an abstract class from which other subclasses inherit and must not be instanciated directly.
- __init__()
- abstract apply(in_dir: str, out_dir: str) None [source]
Applies the preprocess to the given dataset.
- Parameters
in_dir (str) – Input directory where the files are located. Usually, this is the output directory of the splitter step.
out_dir (str) – Output directory where the files will be saved.
- load_input(in_dir: str) -> (<class 'pandas.core.frame.DataFrame'>, <class 'pandas.core.frame.DataFrame'>)[source]
Read parquet data and labels files of the chosen dataset before it’s split.
- Parameters
in_dir (str) – Input directory where the files are located.
- Returns
data (Pandas Dataframe) – Loaded data file.
labels (Pandas Dataframe) – Loaded labels file.
Methods
__init__
()apply
(in_dir, out_dir)Applies the preprocess to the given dataset.
load_input
(in_dir)Read parquet data and labels files of the chosen dataset before it's split.
save_output
(out_dir, data, labels)Save preprocessed dataset to parquet format.
Simple method to print on the terminal the name of the selected splitter.