Dear sir ,

Just need to know if I can use a function transformer to generate new
columns in the data set .

Just see the below written pipeline

num_pipeline = Pipeline([('imputer', SimpleImputer(strategy="median")),
                         ('attribs_adder', column_adder),
                         ('std_scaler', StandardScaler()),
                        ])
This pipeline is for numerical attributes in the dataset, firstly it will
treat all mising values in the data set using  SimpleImputer , then i have
made a function to add three more columns in the existing data, i have made
a function transformer with this function and then StandardScaler .

The columns being added are generated from existing columns (by element
wise division of two columns) . So Using a function transformer is ok ?
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to