Skip to content

[SPARK-11938][PySpark] Expose numFeatures in all ML PredictionModel for PySpark #13922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

vectorijk
Copy link
Contributor

What changes were proposed in this pull request?

JIRA: https://issues.apache.org/jira/browse/SPARK-11938

SPARK-9715 provided support for numFeatures in all ML PredictionModels, we should also expose it at PySpark.

How was this patch tested?

Unit Test for PySpark

@vectorijk
Copy link
Contributor Author

cc @jkbradley @yanboliang @Lewuathe

@SparkQA
Copy link

SparkQA commented Jun 27, 2016

Test build #61295 has finished for PR 13922 at commit 872d384.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class LogisticRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
    • class DecisionTreeClassificationModel(DecisionTreeModel, JavaMLWritable, JavaMLReadable):
    • class RandomForestClassificationModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable):
    • class GBTClassificationModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable):
    • class NaiveBayesModel(JavaModel, JavaMLWritable, JavaMLReadable):
    • class MultilayerPerceptronClassificationModel(JavaModel, JavaMLWritable, JavaMLReadable):
    • class LinearRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
    • class DecisionTreeRegressionModel(DecisionTreeModel, JavaMLWritable, JavaMLReadable):
    • class RandomForestRegressionModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable):
    • class GBTRegressionModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable):

@lins05
Copy link
Contributor

lins05 commented Jul 6, 2016

Seems the numFeatures property is repeated in all these classification and regression classes. What about adding a HasNumFeatures mixin class and move the numFeatures property implementation there?

@MLnick
Copy link
Contributor

MLnick commented Jul 18, 2016

@vectorijk this is covered in #12889 by @holdenk

@vectorijk
Copy link
Contributor Author

@MLnick Thanks! I will close this PR.

@vectorijk vectorijk closed this Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants