If you create your own Spark 2.x ML Transformer, there are multiple mix-ins
(is that the correct term?) that you can use to define its behavior which
are in ml/param/shared.py
<https://github.com/apache/spark/blob/master/python/pyspark/ml/param/shared.py>
.

Among them are the following mix-ins:

   - HasInputCol
   - HasInputCols
   - HasOutputCol

What’s *not* available is a HasOutputCols mix-in, and I assume that is
intentional.

Is there a design reason why Transformers should not be able to define
multiple output columns?

I’m guessing if you are an ML beginner who thinks they need a Transformer
with multiple output columns, you’ve misunderstood something. 😅

Nick
​

Reply via email to