Skip to content

Conversation

@felixcheung
Copy link
Member

What changes were proposed in this pull request?

Add subsmaplingRate to randomForestClassifier
Add varianceCol to randomForestRegressor
In Python

How was this patch tested?

manual tests

@felixcheung felixcheung changed the title [SPARK-18110][PYTHON] add missing parameter in Python for RandomForest regression and classification [SPARK-18110][PYTHON][ML] add missing parameter in Python for RandomForest regression and classification Oct 26, 2016
class RandomForestRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol, HasSeed,
RandomForestParams, TreeRegressorParams, HasCheckpointInterval,
JavaMLWritable, JavaMLReadable):
JavaMLWritable, JavaMLReadable, HasVarianceCol):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like to group all the Has* parameters? Just a minor comment on the style.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that doesn't seem to be the existing style, so adding to the end instead

maxDepth=5, maxBins=32, minInstancesPerNode=1, minInfoGain=0.0,
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, impurity="gini",
numTrees=20, featureSubsetStrategy="auto", seed=None):
numTrees=20, featureSubsetStrategy="auto", seed=None, subsamplingRate=1.0):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some doc string tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally spark avoid having too many verbose tests in python doc string, so I think we are ok here.

@SparkQA
Copy link

SparkQA commented Oct 26, 2016

Test build #67558 has finished for PR 15638 at commit e734e01.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@felixcheung
Copy link
Member Author

merged to master.

@asfgit asfgit closed this in 7c37869 Oct 30, 2016
robert3005 pushed a commit to palantir/spark that referenced this pull request Nov 1, 2016
…orest regression and classification

## What changes were proposed in this pull request?

Add subsmaplingRate to randomForestClassifier
Add varianceCol to randomForestRegressor
In Python

## How was this patch tested?

manual tests

Author: Felix Cheung <felixcheung_m@hotmail.com>

Closes apache#15638 from felixcheung/pyrandomforest.
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…orest regression and classification

## What changes were proposed in this pull request?

Add subsmaplingRate to randomForestClassifier
Add varianceCol to randomForestRegressor
In Python

## How was this patch tested?

manual tests

Author: Felix Cheung <felixcheung_m@hotmail.com>

Closes apache#15638 from felixcheung/pyrandomforest.
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.

3 participants