Documentation
¶
Overview ¶
Package calibrate compares two coupling scorers over a coupling.Index and reports per-edge agreement between them.
It is pure: no I/O, no os/exec, no YAML — only coupling model types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeAgreement ¶
type EdgeAgreement struct {
// EdgeKey is the coupling.Index key (from\x00to\x00kind).
EdgeKey string
Strength coupling.Strength
Distance coupling.Distance
Volatility coupling.Volatility
// ScoreA is the result from scorerA (AdditiveScorer).
ScoreA coupling.EdgeScore
// ScoreB is the result from scorerB (MultiplicativeScorer).
ScoreB coupling.EdgeScore
BandAgree bool // ScoreA.Band == ScoreB.Band
}
EdgeAgreement records one edge's scores from both scorers.
type Report ¶
type Report struct {
RepoPath string
EdgeCount int
AgreeCount int
Edges []EdgeAgreement
}
Report is the calibration result for one repo.
func Compare ¶
Compare runs both scorers over idx and returns a Report.
Only cross-boundary edges are included — same_module and unknown distance edges are skipped, matching what classify.Run scores.
func (Report) BandAgreementRate ¶
BandAgreementRate returns AgreeCount/EdgeCount as a float64. Returns 0 when EdgeCount is 0.
Click to show internal directories.
Click to hide internal directories.