Github user jkbradley commented on the pull request:
https://github.com/apache/spark/pull/3975#issuecomment-70299952
My 2 cents: I think the right places to do the transformation and check are:
* Transforming -1/+1 to 0/1: This should be done by the loadLibSVMFile
methods automatically.
* Checking for 0-based indexed labels: This should be done by each
algorithm when it is called. That way, behavior is not changed.
Note for the spark.ml package: The behavior can be improved as we move to
SchemaRDDs with metadata. A label column should have metadata about the labels
(numClasses, plus a dictionary if they are mapped to 0-based indices). Data
loading methods should add this metadata automatically. Algorithms should see
if the metadata exists and call a column indexing method if not.
---
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]