Uh oh!
There was an error while loading. Please reload this page.
[SPARK-15031][EXAMPLES][FOLLOW-UP] Make Python param example working with SparkSession - #13135
Closed
HyukjinKwon wants to merge 4 commits into
Closed
[SPARK-15031][EXAMPLES][FOLLOW-UP] Make Python param example working with SparkSession#13135HyukjinKwon wants to merge 4 commits into
HyukjinKwon wants to merge 4 commits into
Conversation
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
It seems most of Python examples were changed to use SparkSession by #12809. This PR said both examples below:
simple_params_example.pyaft_survival_regression.pyare not changed because it dose not work. It seems
aft_survival_regression.pyis changed by #13050 butsimple_params_example.pyis not yet.This PR corrects the example and make this use SparkSession.
In more detail, it seems
thresholdis replaced tothresholdshere and there by 5a23213. However, when it callslr.fit(training, paramMap)this overwrites the values. So,thresholdwas 5 andthresholdsbecomes 5.5 (by1 / (1 + thresholds(0) / thresholds(1)).According to the comment below. this is not allowed,
spark/mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala
Lines 58 to 61 in 354f8f1
So, in this PR, it sets the equivalent value so that this does not throw an exception.
How was this patch tested?
Manully (
mvn package -DskipTests && spark-submit simple_params_example.py)