WeichenXu123 commented on pull request #30471:
URL: https://github.com/apache/spark/pull/30471#issuecomment-732578139
Example:
In following:
```
lr1 = LogisticRegression()
lr2 = LogisticRegression(**) #different params setting with lr1
ovs1 = OneVsRest()
hashTF1 = HashTF()
```
(1) `CrossValidator(estimator=lr1, evaluator=ev1)`, tune on paramMaps: [
{lr1.maxIter: 3, lr1.regParam: 0.1}, {lr1.maxIter: 5, lr1.regParam: 0.01} ],
then:
uidMap = {lr1.uid: lr1, ev1.uid: ev1}, all params in estimatorParamMaps
`isJson` = True
(2)
```
pipeline1 = Pipeline(stages=[hashTF1, lr1])
CrossValidator(estimator=pipeline1, evaluator=ev1)
```
, tune on paramMaps: [ {hashTF1.numFeatures: 10, lr1.maxIter: 3},
{hashTF1.numFeatures: 20, lr1.maxIter: 5} ], then:
uidMap = {pipeline1.uid: pipeline1, hashTF1.uid: hashTF1, lr1.uid: lr1,
ev1.uid: ev1}, all params in estimatorParamMaps `isJson` = True
(3)
`CrossValidator(estimator=ovs1, evaluator=ev1)`, tune on paramMaps:
[{ovs1.classifier: lr1}, {ovs1.classifier: lr2}], then
uidMap = {ovs1.uid: ovs1, lr1.uid: lr1, ev1.uid: ev1}, all params in
estimatorParamMaps `isJson` = False (the param values is lr1 or lr2)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]