Github user erikerlandson commented on the pull request:
https://github.com/apache/spark/pull/1964#issuecomment-52996580
I think the design can be made somewhat less complex. I coded up an
example here:
https://gist.github.com/erikerlandson/f4b9b9a5c9469f2d9006
A couple features to note:
* you can overload the `apply` method for both breeze vectors and scala
vectors. I defaulted the direct implementation to breeze, on the theory that
this is where mllib is headed internally, but the overloadings for scala
vectors can also be directly coded if there is a need
* I don't think a Weighted trait improves the design. If a class wants
weights, it can take them as a constructor parameter and then use them.
* I think there is no need for error checking on vector sizes, since breeze
will do the same checking.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]