![]() Receives a dictionary for mapping entries on categorical columnsĬhanges dtypes for columns based on a "mod_dict" argumentĪpplies dummies encoding process (OrdinalEncoder using pd.get_dummies() method)įills null data (at just only columns, if needed) Limits entries in categorical columns and restrict them based on a "n_cat" argument Transforms a raw target column in a binary one (1 or 0) based on a positive class argumentĪpplies a separation on data and creates new sets using train_test_split() function ClassĪpplies a custom column formatting in a pandas DataFrame to standardize column namesįilters columns in a DataFrame based on a list passed as a class attribute ![]() After that, it will be placed an example of a data prep pipeline written using some of those classes. If things are still a little complicated, the table below contains all classes built inside transformers module. This way, the code for data transformation itself is written inside a transform() method in each class, giving the chance for execute a sequence of steps outside the module in a more complex Pipeline and also the possibility to use user custom classes on this preparation flow. ![]() In order to provide the opportunity to integrate these classes into a preparation pipeline using sklearn's Pipeline, every class on transformers module inherits BaseEstimator and TransformerMixin from sklearn. We will dive deep into those pieces on this documentation and I'm sure you will like it! Transformers ModuleĪs said on the top of this section, the transformers module allocates custom classes with useful transformations to be applied on data prep pipelines. The second one is a powerful tool for training and evaluating Machine Learning models with classes for each different task (binary classification, multiclass classification and regression at this time). The first one contains custom python classes written strategically for improving constructions of pipelines using native sklearn's class Pipeline. The package is built around two main modules called transformers and trainer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |