spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph K. Bradley (JIRA)" <>
Subject [jira] [Commented] (SPARK-24467) VectorAssemblerEstimator
Date Thu, 14 Jun 2018 00:36:00 GMT


Joseph K. Bradley commented on SPARK-24467:

True, we would have to make the VectorAssembler inherit from Model.  Since VectorAssembler
has public constructors and is not a final class, that would technically be a breaking change.
 This might not work : (  ...until Spark 3.0.  That seems like a benign enough breaking change
to put in a major Spark release.

> VectorAssemblerEstimator
> ------------------------
>                 Key: SPARK-24467
>                 URL:
>             Project: Spark
>          Issue Type: New Feature
>          Components: ML
>    Affects Versions: 2.4.0
>            Reporter: Joseph K. Bradley
>            Priority: Major
> In [SPARK-22346], I believe I made a wrong API decision: I recommended added `VectorSizeHint`
instead of making `VectorAssembler` into an Estimator since I thought the latter option would
break most workflows.  However, I should have proposed:
> * Add a Param to VectorAssembler for specifying the sizes of Vectors in the inputCols.
 This Param can be optional.  If not given, then VectorAssembler will behave as it does now.
 If given, then VectorAssembler can use that info instead of figuring out the Vector sizes
via metadata or examining Rows in the data (though it could do consistency checks).
> * Add a VectorAssemblerEstimator which gets the Vector lengths from data and produces
a VectorAssembler with the vector lengths Param specified.
> This will not break existing workflows.  Migrating to VectorAssemblerEstimator will be
easier than adding VectorSizeHint since it will not require users to manually input Vector
> Note: Even with this Estimator, VectorSizeHint might prove useful for other things in
the future which require vector length metadata, so we could consider keeping it rather than
deprecating it.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message