SciPy - Integration with Scientific Ecosystem
What will be the output of the following code snippet?
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import FunctionTransformer
import numpy as np
def add_one(X):
return X + 1
pipe = Pipeline([
('add', FunctionTransformer(add_one)),
])
X = np.array([1, 2, 3])
result = pipe.transform(X)
print(result)