Documentation
¶
Overview ¶
Package score implements the standalone reputation scoring model using a v2 risk-weighted categorical algorithm. It exposes Compute, Signals, category weights, and ModelVersion.
Index ¶
Constants ¶
View Source
const ModelVersion = "2.0.0"
ModelVersion is the current scoring model version.
Variables ¶
View Source
var ( CategoryProvenanceWeight = provenanceWeight CategoryIdentityWeight = ageWeight + orgMemberWeight CategoryEngagementWeight = proportionWeight + recencyWeight CategoryCommunityWeight = followerWeight + repoCountWeight )
Exported category weights derived from signal constants above.
Functions ¶
Types ¶
type CategoryWeight ¶
type CategoryWeight struct {
Name string `json:"name" yaml:"name"`
Weight float64 `json:"weight" yaml:"weight"`
}
CategoryWeight describes a scoring category and its weight.
func Categories ¶
func Categories() []CategoryWeight
Categories returns the model's scoring categories with their weights.
type Signals ¶
type Signals struct {
Suspended bool // Account suspended
StrongAuth bool // 2FA enabled
Commits int64 // Author's commit count
UnverifiedCommits int64 // Commits without verified signatures
TotalCommits int64 // Repo-wide total commits
TotalContributors int // Repo-wide contributor count
AgeDays int64 // Days since account creation
OrgMember bool // Member of repo owner's org
LastCommitDays int64 // Days since most recent commit
Followers int64 // GitHub follower count
Following int64 // Following count (for ratio)
PublicRepos int64 // Public repository count
PrivateRepos int64 // Private repository count
}
Signals holds the raw inputs to the reputation model.
Click to show internal directories.
Click to hide internal directories.