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)
    result = pipeline2.predict(feature_vector)

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.