1

1

How to correctly model a if condition to choose estimator/predictor(linear regression, gbt) to be used in scikit/spark-ml in a single pipeline.

```
if feature_x < constant:
result = pipeline1.predict(feature_vector)
else:
result = pipeline2.predict(feature_vector)
```

Other than modelling it as custom transformer/predictor, is there a alternate way to model it in a pipeline