[ https://issues.apache.org/jira/browse/SPARK-13030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16177939#comment-16177939 ]
Nick Pentreath commented on SPARK-13030: ---------------------------------------- It's ugly but we can introduce a new class {{OneHotEncoderEstimator extends Estimator[_]}}. The fit method should return a {{OneHotEncoderModel}}. We then deprecate {{OneHotEncoder}} and in {{3.0}} we rename {{OneHotEncoderEstimator -> OneHotEncoder}} and remove the old {{OneHotEncoder}}? Alternatively, we can just create a new name such as {{CategoryEncoder}} or {{CategoricalEncoder}} and deprecate the old {{OneHotEncoder}}. > Change OneHotEncoder to Estimator > --------------------------------- > > Key: SPARK-13030 > URL: https://issues.apache.org/jira/browse/SPARK-13030 > Project: Spark > Issue Type: Improvement > Components: ML > Affects Versions: 1.6.0 > Reporter: Wojciech Jurczyk > > OneHotEncoder should be an Estimator, just like in scikit-learn > (http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html). > In its current form, it is impossible to use when number of categories is > different between training dataset and test dataset. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org