Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit bcdf3c9

Browse files
committed
update docstring seeds to none and some other default seeds from 42
1 parent 65eba21 commit bcdf3c9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/pyspark/ml/feature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def __init__(self, vectorSize=100, minCount=5, numPartitions=1, stepSize=0.025,
793793
seed=None, inputCol=None, outputCol=None):
794794
"""
795795
__init__(self, vectorSize=100, minCount=5, numPartitions=1, stepSize=0.025, maxIter=1,
796-
seed=42, inputCol=None, outputCol=None)
796+
seed=None, inputCol=None, outputCol=None)
797797
"""
798798
super(Word2Vec, self).__init__()
799799
self.vectorSize = Param(self, "vectorSize",
@@ -804,7 +804,7 @@ def __init__(self, vectorSize=100, minCount=5, numPartitions=1, stepSize=0.025,
804804
"the minimum number of times a token must appear to be included " +
805805
"in the word2vec model's vocabulary")
806806
self._setDefault(vectorSize=100, minCount=5, numPartitions=1, stepSize=0.025, maxIter=1,
807-
seed=42)
807+
seed=None)
808808
kwargs = self.__init__._input_kwargs
809809
self.setParams(**kwargs)
810810

python/pyspark/ml/regression.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def __init__(self, featuresCol="features", labelCol="label", predictionCol="pred
271271
__init__(self, featuresCol="features", labelCol="label", predictionCol="prediction",
272272
maxDepth=5, maxBins=32, minInstancesPerNode=1, minInfoGain=0.0,
273273
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, impurity="variance",
274-
numTrees=20, featureSubsetStrategy="auto", seed=42)
274+
numTrees=20, featureSubsetStrategy="auto", seed=None)
275275
"""
276276
super(RandomForestRegressor, self).__init__()
277277
#: param for Criterion used for information gain calculation (case-insensitive).
@@ -292,7 +292,7 @@ def __init__(self, featuresCol="features", labelCol="label", predictionCol="pred
292292
"The number of features to consider for splits at each tree node. Supported " +
293293
"options: " + ", ".join(RandomForestParams.supportedFeatureSubsetStrategies))
294294
self._setDefault(maxDepth=5, maxBins=32, minInstancesPerNode=1, minInfoGain=0.0,
295-
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, seed=42,
295+
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, seed=None,
296296
impurity="variance", numTrees=20, featureSubsetStrategy="auto")
297297
kwargs = self.__init__._input_kwargs
298298
self.setParams(**kwargs)
@@ -305,7 +305,7 @@ def setParams(self, featuresCol="features", labelCol="label", predictionCol="pre
305305
"""
306306
setParams(self, featuresCol="features", labelCol="label", predictionCol="prediction",
307307
maxDepth=5, maxBins=32, minInstancesPerNode=1, minInfoGain=0.0,
308-
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, seed=42,
308+
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, seed=None,
309309
impurity="variance", numTrees=20, featureSubsetStrategy="auto")
310310
Sets params for linear regression.
311311
"""

0 commit comments

Comments
 (0)