Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Log data about logistic regression.
  • Loading branch information
MrBago committed Mar 30, 2018
commit 42c3eca78a58ddca059b150681a0deaf462981f8
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,12 @@ class LogisticRegression @Since("1.2.0") (
(new MultivariateOnlineSummarizer, new MultiClassSummarizer)
)(seqOp, combOp, $(aggregationDepth))
}
instr.logNamedValue(Instrumentation.loggerTags.numExamples, summarizer.count)
if (labelSummarizer.numClasses == 2) {
val b = labelSummarizer.histogram(0) / summarizer.count
instr.logNamedValue("lowestLabelWeight", labelSummarizer.histogram.min.toString)
instr.logNamedValue("highestLabelWeight", labelSummarizer.histogram.min.toString)
}

val histogram = labelSummarizer.histogram
val numInvalid = labelSummarizer.countInvalid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ private[spark] object Instrumentation {
object loggerTags {
val numFeatures = "numFeatures"
val numClasses = "numClasses"
val numExamples = "numExamples"
}

/**
Expand Down