Skip to content

Commit

Permalink
update all self.paramMap to self._paramMap
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed May 14, 2015
1 parent 46cb6ed commit b6db1ed
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
22 changes: 11 additions & 11 deletions python/pyspark/ml/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def setElasticNetParam(self, value):
"""
Sets the value of :py:attr:`elasticNetParam`.
"""
self.paramMap[self.elasticNetParam] = value
self._paramMap[self.elasticNetParam] = value
return self

def getElasticNetParam(self):
Expand All @@ -120,7 +120,7 @@ def setFitIntercept(self, value):
"""
Sets the value of :py:attr:`fitIntercept`.
"""
self.paramMap[self.fitIntercept] = value
self._paramMap[self.fitIntercept] = value
return self

def getFitIntercept(self):
Expand All @@ -133,7 +133,7 @@ def setThreshold(self, value):
"""
Sets the value of :py:attr:`threshold`.
"""
self.paramMap[self.threshold] = value
self._paramMap[self.threshold] = value
return self

def getThreshold(self):
Expand Down Expand Up @@ -239,7 +239,7 @@ def setImpurity(self, value):
"""
Sets the value of :py:attr:`impurity`.
"""
self.paramMap[self.impurity] = value
self._paramMap[self.impurity] = value
return self

def getImpurity(self):
Expand Down Expand Up @@ -353,7 +353,7 @@ def setImpurity(self, value):
"""
Sets the value of :py:attr:`impurity`.
"""
self.paramMap[self.impurity] = value
self._paramMap[self.impurity] = value
return self

def getImpurity(self):
Expand All @@ -366,7 +366,7 @@ def setSubsamplingRate(self, value):
"""
Sets the value of :py:attr:`subsamplingRate`.
"""
self.paramMap[self.subsamplingRate] = value
self._paramMap[self.subsamplingRate] = value
return self

def getSubsamplingRate(self):
Expand All @@ -379,7 +379,7 @@ def setNumTrees(self, value):
"""
Sets the value of :py:attr:`numTrees`.
"""
self.paramMap[self.numTrees] = value
self._paramMap[self.numTrees] = value
return self

def getNumTrees(self):
Expand All @@ -392,7 +392,7 @@ def setFeatureSubsetStrategy(self, value):
"""
Sets the value of :py:attr:`featureSubsetStrategy`.
"""
self.paramMap[self.featureSubsetStrategy] = value
self._paramMap[self.featureSubsetStrategy] = value
return self

def getFeatureSubsetStrategy(self):
Expand Down Expand Up @@ -500,7 +500,7 @@ def setLossType(self, value):
"""
Sets the value of :py:attr:`lossType`.
"""
self.paramMap[self.lossType] = value
self._paramMap[self.lossType] = value
return self

def getLossType(self):
Expand All @@ -513,7 +513,7 @@ def setSubsamplingRate(self, value):
"""
Sets the value of :py:attr:`subsamplingRate`.
"""
self.paramMap[self.subsamplingRate] = value
self._paramMap[self.subsamplingRate] = value
return self

def getSubsamplingRate(self):
Expand All @@ -526,7 +526,7 @@ def setStepSize(self, value):
"""
Sets the value of :py:attr:`stepSize`.
"""
self.paramMap[self.stepSize] = value
self._paramMap[self.stepSize] = value
return self

def getStepSize(self):
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/ml/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def setSplits(self, value):
"""
Sets the value of :py:attr:`splits`.
"""
self.paramMap[self.splits] = value
self._paramMap[self.splits] = value
return self

def getSplits(self):
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/ml/param/_shared_params_code_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def set$Name(self, value):
"""
Sets the value of :py:attr:`$name`.
"""
self.paramMap[self.$name] = value
self._paramMap[self.$name] = value
return self
def get$Name(self):
Expand Down
14 changes: 7 additions & 7 deletions python/pyspark/ml/param/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def setProbabilityCol(self, value):
"""
Sets the value of :py:attr:`probabilityCol`.
"""
self.paramMap[self.probabilityCol] = value
self._paramMap[self.probabilityCol] = value
return self

def getProbabilityCol(self):
Expand Down Expand Up @@ -487,7 +487,7 @@ def setMaxDepth(self, value):
"""
Sets the value of :py:attr:`maxDepth`.
"""
self.paramMap[self.maxDepth] = value
self._paramMap[self.maxDepth] = value
return self

def getMaxDepth(self):
Expand All @@ -500,7 +500,7 @@ def setMaxBins(self, value):
"""
Sets the value of :py:attr:`maxBins`.
"""
self.paramMap[self.maxBins] = value
self._paramMap[self.maxBins] = value
return self

def getMaxBins(self):
Expand All @@ -513,7 +513,7 @@ def setMinInstancesPerNode(self, value):
"""
Sets the value of :py:attr:`minInstancesPerNode`.
"""
self.paramMap[self.minInstancesPerNode] = value
self._paramMap[self.minInstancesPerNode] = value
return self

def getMinInstancesPerNode(self):
Expand All @@ -526,7 +526,7 @@ def setMinInfoGain(self, value):
"""
Sets the value of :py:attr:`minInfoGain`.
"""
self.paramMap[self.minInfoGain] = value
self._paramMap[self.minInfoGain] = value
return self

def getMinInfoGain(self):
Expand All @@ -539,7 +539,7 @@ def setMaxMemoryInMB(self, value):
"""
Sets the value of :py:attr:`maxMemoryInMB`.
"""
self.paramMap[self.maxMemoryInMB] = value
self._paramMap[self.maxMemoryInMB] = value
return self

def getMaxMemoryInMB(self):
Expand All @@ -552,7 +552,7 @@ def setCacheNodeIds(self, value):
"""
Sets the value of :py:attr:`cacheNodeIds`.
"""
self.paramMap[self.cacheNodeIds] = value
self._paramMap[self.cacheNodeIds] = value
return self

def getCacheNodeIds(self):
Expand Down
18 changes: 9 additions & 9 deletions python/pyspark/ml/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def setElasticNetParam(self, value):
"""
Sets the value of :py:attr:`elasticNetParam`.
"""
self.paramMap[self.elasticNetParam] = value
self._paramMap[self.elasticNetParam] = value
return self

def getElasticNetParam(self):
Expand Down Expand Up @@ -210,7 +210,7 @@ def setImpurity(self, value):
"""
Sets the value of :py:attr:`impurity`.
"""
self.paramMap[self.impurity] = value
self._paramMap[self.impurity] = value
return self

def getImpurity(self):
Expand Down Expand Up @@ -319,7 +319,7 @@ def setImpurity(self, value):
"""
Sets the value of :py:attr:`impurity`.
"""
self.paramMap[self.impurity] = value
self._paramMap[self.impurity] = value
return self

def getImpurity(self):
Expand All @@ -332,7 +332,7 @@ def setSubsamplingRate(self, value):
"""
Sets the value of :py:attr:`subsamplingRate`.
"""
self.paramMap[self.subsamplingRate] = value
self._paramMap[self.subsamplingRate] = value
return self

def getSubsamplingRate(self):
Expand All @@ -345,7 +345,7 @@ def setNumTrees(self, value):
"""
Sets the value of :py:attr:`numTrees`.
"""
self.paramMap[self.numTrees] = value
self._paramMap[self.numTrees] = value
return self

def getNumTrees(self):
Expand All @@ -358,7 +358,7 @@ def setFeatureSubsetStrategy(self, value):
"""
Sets the value of :py:attr:`featureSubsetStrategy`.
"""
self.paramMap[self.featureSubsetStrategy] = value
self._paramMap[self.featureSubsetStrategy] = value
return self

def getFeatureSubsetStrategy(self):
Expand Down Expand Up @@ -461,7 +461,7 @@ def setLossType(self, value):
"""
Sets the value of :py:attr:`lossType`.
"""
self.paramMap[self.lossType] = value
self._paramMap[self.lossType] = value
return self

def getLossType(self):
Expand All @@ -474,7 +474,7 @@ def setSubsamplingRate(self, value):
"""
Sets the value of :py:attr:`subsamplingRate`.
"""
self.paramMap[self.subsamplingRate] = value
self._paramMap[self.subsamplingRate] = value
return self

def getSubsamplingRate(self):
Expand All @@ -487,7 +487,7 @@ def setStepSize(self, value):
"""
Sets the value of :py:attr:`stepSize`.
"""
self.paramMap[self.stepSize] = value
self._paramMap[self.stepSize] = value
return self

def getStepSize(self):
Expand Down

0 comments on commit b6db1ed

Please sign in to comment.