-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-18206][ML]Add instrumentation for MLP,NB,LDA,AFT,GLM,Isotonic,LiR #15671
Closed
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
25258ae
create pr
zhengruifeng 2bc4e29
fix nits
zhengruifeng b0b2cc3
add instr for regression
zhengruifeng 41aff47
add instr for algos
zhengruifeng 5dc6b43
update
zhengruifeng 457196a
remove cla.params
zhengruifeng 22c9f0c
add numfea in rf and dt
zhengruifeng ff49d70
revert OvR
zhengruifeng e2a1546
revert trees
zhengruifeng 867f08b
list params; correct logSuccess place; update comment of logSuccess
zhengruifeng d129416
select params in gbt and rf
zhengruifeng e62a688
fix glr,aft,lir
zhengruifeng 19828e1
fix style
zhengruifeng 6e27321
update als
zhengruifeng 6d48759
fix conflict
zhengruifeng c172efc
fix glr
zhengruifeng 00b91fd
fix style
zhengruifeng c8693d8
update
zhengruifeng e6b4615
Merge branch 'master' into lir_instr
zhengruifeng 7f00d36
log quantileProbabilities.size
zhengruifeng c8188b0
del docConcentration
zhengruifeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,6 +227,12 @@ class AFTSurvivalRegression @Since("1.6.0") (@Since("1.6.0") override val uid: S | |
val featuresStd = featuresSummarizer.variance.toArray.map(math.sqrt) | ||
val numFeatures = featuresStd.size | ||
|
||
val instr = Instrumentation.create(this, dataset) | ||
instr.logParams(labelCol, featuresCol, censorCol, predictionCol, quantilesCol, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also log "quantileProbabilities" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is a |
||
fitIntercept, maxIter, tol, aggregationDepth) | ||
instr.logNamedValue("quantileProbabilities.size", $(quantileProbabilities).length) | ||
instr.logNumFeatures(numFeatures) | ||
|
||
if (!$(fitIntercept) && (0 until numFeatures).exists { i => | ||
featuresStd(i) == 0.0 && featuresSummarizer.mean(i) != 0.0 }) { | ||
logWarning("Fitting AFTSurvivalRegressionModel without intercept on dataset with " + | ||
|
@@ -276,8 +282,10 @@ class AFTSurvivalRegression @Since("1.6.0") (@Since("1.6.0") override val uid: S | |
val coefficients = Vectors.dense(rawCoefficients) | ||
val intercept = parameters(1) | ||
val scale = math.exp(parameters(0)) | ||
val model = new AFTSurvivalRegressionModel(uid, coefficients, intercept, scale) | ||
copyValues(model.setParent(this)) | ||
val model = copyValues(new AFTSurvivalRegressionModel(uid, coefficients, | ||
intercept, scale).setParent(this)) | ||
instr.logSuccess(model) | ||
model | ||
} | ||
|
||
@Since("1.6.0") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "docConcentration"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave it out by intention. Because
docConcentration
may be a double arrary of sizek
, it maybe too large to log.