FunctionTransformer

class ibex.sklearn.preprocessing.FunctionTransformer(func=None, in_cols=None, out_cols=None, pass_y=None, kw_args=None)[source]

Bases: sklearn.base.BaseEstimator, sklearn.base.TransformerMixin, ibex._base.FrameMixin

Transforms using a function.

Parameters:
  • func

    One of:

    • None
    • a callable
    • a step
  • in_cols

    One of:

    • None
    • a string
    • a list of strings
  • out_cols
  • pass_y – Boolean indicating whether to pass the y argument to
  • kw_args – Keyword arguments.
Returns:

An sklearn.preprocessing.FunctionTransformer object.

fit(X, y=None)[source]

Fits the transformer using X (and possibly y).

Returns:self
fit_transform(X, y=None)[source]

Fits the transformer using X (and possibly y), and transforms, in one step if possible

Returns:Transformed data.
transform(X, y=None)[source]
Returns:Transformed data.