|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +# DO NOT MODIFY. The code is generated by _gen_shared_params.py. |
| 19 | + |
| 20 | +from pyspark.ml.param import Param, Params |
| 21 | + |
| 22 | + |
| 23 | +class HasMaxIter(Params): |
| 24 | + |
| 25 | + def __init__(self): |
| 26 | + super(HasMaxIter, self).__init__() |
| 27 | + #: max number of iterations |
| 28 | + self.maxIter = Param(self, "maxIter", "max number of iterations", 100) |
| 29 | + |
| 30 | + def setMaxIter(self, value): |
| 31 | + self.paramMap[self.maxIter] = value |
| 32 | + return self |
| 33 | + |
| 34 | + def getMaxIter(self, value): |
| 35 | + if self.maxIter in self.paramMap: |
| 36 | + return self.paramMap[self.maxIter] |
| 37 | + else: |
| 38 | + return self.defaultValue |
| 39 | + |
| 40 | + |
| 41 | +class HasRegParam(Params): |
| 42 | + |
| 43 | + def __init__(self): |
| 44 | + super(HasRegParam, self).__init__() |
| 45 | + #: regularization constant |
| 46 | + self.regParam = Param(self, "regParam", "regularization constant", 0.1) |
| 47 | + |
| 48 | + def setRegParam(self, value): |
| 49 | + self.paramMap[self.regParam] = value |
| 50 | + return self |
| 51 | + |
| 52 | + def getRegParam(self, value): |
| 53 | + if self.regParam in self.paramMap: |
| 54 | + return self.paramMap[self.regParam] |
| 55 | + else: |
| 56 | + return self.defaultValue |
| 57 | + |
| 58 | + |
| 59 | +class HasFeaturesCol(Params): |
| 60 | + |
| 61 | + def __init__(self): |
| 62 | + super(HasFeaturesCol, self).__init__() |
| 63 | + #: features column name |
| 64 | + self.featuresCol = Param(self, "featuresCol", "features column name", 'features') |
| 65 | + |
| 66 | + def setFeaturesCol(self, value): |
| 67 | + self.paramMap[self.featuresCol] = value |
| 68 | + return self |
| 69 | + |
| 70 | + def getFeaturesCol(self, value): |
| 71 | + if self.featuresCol in self.paramMap: |
| 72 | + return self.paramMap[self.featuresCol] |
| 73 | + else: |
| 74 | + return self.defaultValue |
| 75 | + |
| 76 | + |
| 77 | +class HasLabelCol(Params): |
| 78 | + |
| 79 | + def __init__(self): |
| 80 | + super(HasLabelCol, self).__init__() |
| 81 | + #: label column name |
| 82 | + self.labelCol = Param(self, "labelCol", "label column name", 'label') |
| 83 | + |
| 84 | + def setLabelCol(self, value): |
| 85 | + self.paramMap[self.labelCol] = value |
| 86 | + return self |
| 87 | + |
| 88 | + def getLabelCol(self, value): |
| 89 | + if self.labelCol in self.paramMap: |
| 90 | + return self.paramMap[self.labelCol] |
| 91 | + else: |
| 92 | + return self.defaultValue |
| 93 | + |
| 94 | + |
| 95 | +class HasPredictionCol(Params): |
| 96 | + |
| 97 | + def __init__(self): |
| 98 | + super(HasPredictionCol, self).__init__() |
| 99 | + #: prediction column name |
| 100 | + self.predictionCol = Param(self, "predictionCol", "prediction column name", 'prediction') |
| 101 | + |
| 102 | + def setPredictionCol(self, value): |
| 103 | + self.paramMap[self.predictionCol] = value |
| 104 | + return self |
| 105 | + |
| 106 | + def getPredictionCol(self, value): |
| 107 | + if self.predictionCol in self.paramMap: |
| 108 | + return self.paramMap[self.predictionCol] |
| 109 | + else: |
| 110 | + return self.defaultValue |
| 111 | + |
| 112 | + |
| 113 | +class HasInputCol(Params): |
| 114 | + |
| 115 | + def __init__(self): |
| 116 | + super(HasInputCol, self).__init__() |
| 117 | + #: input column name |
| 118 | + self.inputCol = Param(self, "inputCol", "input column name", 'input') |
| 119 | + |
| 120 | + def setInputCol(self, value): |
| 121 | + self.paramMap[self.inputCol] = value |
| 122 | + return self |
| 123 | + |
| 124 | + def getInputCol(self, value): |
| 125 | + if self.inputCol in self.paramMap: |
| 126 | + return self.paramMap[self.inputCol] |
| 127 | + else: |
| 128 | + return self.defaultValue |
| 129 | + |
| 130 | + |
| 131 | +class HasOutputCol(Params): |
| 132 | + |
| 133 | + def __init__(self): |
| 134 | + super(HasOutputCol, self).__init__() |
| 135 | + #: output column name |
| 136 | + self.outputCol = Param(self, "outputCol", "output column name", 'output') |
| 137 | + |
| 138 | + def setOutputCol(self, value): |
| 139 | + self.paramMap[self.outputCol] = value |
| 140 | + return self |
| 141 | + |
| 142 | + def getOutputCol(self, value): |
| 143 | + if self.outputCol in self.paramMap: |
| 144 | + return self.paramMap[self.outputCol] |
| 145 | + else: |
| 146 | + return self.defaultValue |
0 commit comments