@@ -319,12 +319,12 @@ class RandomForestClassifier(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPred
319
319
def __init__ (self , featuresCol = "features" , labelCol = "label" , predictionCol = "prediction" ,
320
320
maxDepth = 5 , maxBins = 32 , minInstancesPerNode = 1 , minInfoGain = 0.0 ,
321
321
maxMemoryInMB = 256 , cacheNodeIds = False , checkpointInterval = 10 , impurity = "gini" ,
322
- numTrees = 20 , featureSubsetStrategy = "auto" , seed = 42 ):
322
+ numTrees = 20 , featureSubsetStrategy = "auto" , seed = None ):
323
323
"""
324
324
__init__(self, featuresCol="features", labelCol="label", predictionCol="prediction", \
325
325
maxDepth=5, maxBins=32, minInstancesPerNode=1, minInfoGain=0.0, \
326
326
maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, impurity="gini", \
327
- numTrees=20, featureSubsetStrategy="auto", seed=42 )
327
+ numTrees=20, featureSubsetStrategy="auto", seed=None )
328
328
"""
329
329
super (RandomForestClassifier , self ).__init__ ()
330
330
self ._java_obj = self ._new_java_obj (
@@ -347,20 +347,20 @@ def __init__(self, featuresCol="features", labelCol="label", predictionCol="pred
347
347
"The number of features to consider for splits at each tree node. Supported " +
348
348
"options: " + ", " .join (RandomForestParams .supportedFeatureSubsetStrategies ))
349
349
self ._setDefault (maxDepth = 5 , maxBins = 32 , minInstancesPerNode = 1 , minInfoGain = 0.0 ,
350
- maxMemoryInMB = 256 , cacheNodeIds = False , checkpointInterval = 10 , seed = 42 ,
350
+ maxMemoryInMB = 256 , cacheNodeIds = False , checkpointInterval = 10 , seed = None ,
351
351
impurity = "gini" , numTrees = 20 , featureSubsetStrategy = "auto" )
352
352
kwargs = self .__init__ ._input_kwargs
353
353
self .setParams (** kwargs )
354
354
355
355
@keyword_only
356
356
def setParams (self , featuresCol = "features" , labelCol = "label" , predictionCol = "prediction" ,
357
357
maxDepth = 5 , maxBins = 32 , minInstancesPerNode = 1 , minInfoGain = 0.0 ,
358
- maxMemoryInMB = 256 , cacheNodeIds = False , checkpointInterval = 10 , seed = 42 ,
358
+ maxMemoryInMB = 256 , cacheNodeIds = False , checkpointInterval = 10 , seed = None ,
359
359
impurity = "gini" , numTrees = 20 , featureSubsetStrategy = "auto" ):
360
360
"""
361
361
setParams(self, featuresCol="features", labelCol="label", predictionCol="prediction", \
362
362
maxDepth=5, maxBins=32, minInstancesPerNode=1, minInfoGain=0.0, \
363
- maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, seed=42 , \
363
+ maxMemoryInMB=256, cacheNodeIds=False, checkpointInterval=10, seed=None , \
364
364
impurity="gini", numTrees=20, featureSubsetStrategy="auto")
365
365
Sets params for linear classification.
366
366
"""
0 commit comments