The Lale & combinator is most commonly used with ConcatFeatures. If a pipeline accidentally pipes the output of & directly into an operator that does not expect it, Lale should report a helpful error message for how to fix that mistake. For example, consider the following code:
X, y = load_iris(return_X_y=True)
trainable = (PCA() & NoOp) >> LogisticRegression()
trained = trainable.fit(X, y)
This produces the following error from sklearn:
ValueError: Found array with dim 3. Estimator expected <= 2.
Or, when used with lale.settings.set_disable_data_schema_validation(False), it produces the following error from Lale:
ValueError: LogisticRegression.fit() invalid X, the schema of the actual data is not a subschema of the expected schema of the argument.
It would be nice if the error message would provide the clue to the solution, which would be something like this:
from lale.lib.lale import ConcatFeatures
(PCA() & NoOp) >> ConcatFeatures >> LogisticRegression()
The Lale
&combinator is most commonly used withConcatFeatures. If a pipeline accidentally pipes the output of&directly into an operator that does not expect it, Lale should report a helpful error message for how to fix that mistake. For example, consider the following code:This produces the following error from sklearn:
Or, when used with
lale.settings.set_disable_data_schema_validation(False), it produces the following error from Lale:It would be nice if the error message would provide the clue to the solution, which would be something like this: