Documentation
¶
Index ¶
- func ExportCSV(path string, events []DecisionEvent) error
- func PrioritizeActiveLearning(paperIDs []string) []string
- type ActiveLearningPolicyResult
- type ActiveLearningRun
- type ActiveLearningRunInput
- type ActiveLearningSensitivityInput
- type ActiveLearningSensitivityReport
- type AdjudicatedItem
- type AdjudicationState
- type BalancedPolicy
- type ConflictAdjudicationPanel
- type ConflictItem
- type Decision
- type DecisionEvent
- type DecisionInput
- type MemoryStore
- type ModelMetadata
- type Options
- type PRISMACounts
- type PrioritizedRecord
- func PrioritizeActiveLearningRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage) []PrioritizedRecord
- func PrioritizeBalancedRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage, ...) []PrioritizedRecord
- func PrioritizeModelRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage) []PrioritizedRecord
- func PrioritizeUncertaintyRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage) []PrioritizedRecord
- type ProgressReport
- type QueueFilter
- type RecallEffortPoint
- type RecallEffortSimulation
- type RecallTargetResult
- type ReviewerAssignment
- type ReviewerProgress
- type ScreeningAuditBundle
- type ScreeningAuditBundleInput
- type ScreeningRecord
- type Stage
- type StoppingRecommendation
- type UncertainQueueItem
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportCSV ¶
func ExportCSV(path string, events []DecisionEvent) error
func PrioritizeActiveLearning ¶
PrioritizeActiveLearning is a deterministic scaffold for future ASReview-style ranking.
Types ¶
type ActiveLearningPolicyResult ¶
type ActiveLearningPolicyResult struct {
Policy BalancedPolicy `json:"policy"`
RankedCount int `json:"rankedCount"`
Simulation RecallEffortSimulation `json:"simulation"`
Score float64 `json:"score"`
}
type ActiveLearningRun ¶
type ActiveLearningRun struct {
SchemaVersion string `json:"schemaVersion"`
RunID string `json:"runId"`
Stage Stage `json:"stage"`
InputHash string `json:"inputHash"`
DecisionHash string `json:"decisionHash"`
RankingMethod string `json:"rankingMethod"`
SeedDecisions []DecisionEvent `json:"seedDecisions"`
RankedOutput []PrioritizedRecord `json:"rankedOutput"`
ReviewerProgress ProgressReport `json:"reviewerProgress"`
StoppingDiagnostics StoppingRecommendation `json:"stoppingDiagnostics"`
AdjudicationState AdjudicationState `json:"adjudicationState"`
}
func BuildActiveLearningRun ¶
func BuildActiveLearningRun(input ActiveLearningRunInput) (ActiveLearningRun, error)
type ActiveLearningRunInput ¶
type ActiveLearningRunInput struct {
RunID string
Records []ScreeningRecord
Events []DecisionEvent
Stage Stage
RankingMethod string
TargetRecall float64
}
type ActiveLearningSensitivityInput ¶
type ActiveLearningSensitivityInput struct {
Records []ScreeningRecord
Events []DecisionEvent
Stage Stage
RelevantPaperIDs []string
Policies []BalancedPolicy
TargetRecalls []float64
}
type ActiveLearningSensitivityReport ¶
type ActiveLearningSensitivityReport struct {
SchemaVersion string `json:"schemaVersion"`
Stage Stage `json:"stage"`
InputHash string `json:"inputHash"`
DecisionHash string `json:"decisionHash"`
SelectedPolicy string `json:"selectedPolicy"`
PolicyResults []ActiveLearningPolicyResult `json:"policyResults"`
}
func ActiveLearningSensitivityDiagnostics ¶
func ActiveLearningSensitivityDiagnostics(input ActiveLearningSensitivityInput) (ActiveLearningSensitivityReport, error)
type AdjudicatedItem ¶
type AdjudicatedItem struct {
PaperID string `json:"paperId"`
Decision DecisionEvent `json:"decision"`
}
type AdjudicationState ¶
type BalancedPolicy ¶
type BalancedPolicy struct {
Name string `json:"name"`
ExploitationWeight float64 `json:"exploitationWeight"`
ExplorationWeight float64 `json:"explorationWeight"`
}
func DefaultBalancedPolicies ¶
func DefaultBalancedPolicies() []BalancedPolicy
type ConflictAdjudicationPanel ¶
type ConflictAdjudicationPanel struct {
Stage Stage `json:"stage"`
Conflicts []ConflictItem `json:"conflicts"`
Adjudicated []AdjudicatedItem `json:"adjudicated"`
}
func BuildConflictAdjudicationPanel ¶
func BuildConflictAdjudicationPanel(events []DecisionEvent, stage Stage) ConflictAdjudicationPanel
type ConflictItem ¶
type ConflictItem struct {
PaperID string `json:"paperId"`
Decisions []DecisionEvent `json:"decisions"`
}
type DecisionEvent ¶
type DecisionEvent struct {
PaperID string
Stage Stage
Decision Decision
Reason string
Reviewer string
Adjudicated bool
}
func ImportCSV ¶
func ImportCSV(path string) ([]DecisionEvent, error)
func NormalizeDecisionEvent ¶ added in v0.1.18
func NormalizeDecisionEvent(event DecisionEvent) DecisionEvent
type DecisionInput ¶
type DecisionInput struct {
PaperID string
Stage Stage
Decision Decision
Reason string
Reviewer string
Adjudicated bool
}
func NormalizeDecisionInput ¶ added in v0.1.18
func NormalizeDecisionInput(input DecisionInput) DecisionInput
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore(workflow Workflow) *MemoryStore
func (*MemoryStore) Conflicts ¶
func (s *MemoryStore) Conflicts(stage Stage) []string
func (*MemoryStore) Decide ¶
func (s *MemoryStore) Decide(input DecisionInput) error
func (*MemoryStore) History ¶
func (s *MemoryStore) History(paperID string) []DecisionEvent
func (*MemoryStore) PRISMACounts ¶
func (s *MemoryStore) PRISMACounts() PRISMACounts
func (*MemoryStore) Queue ¶
func (s *MemoryStore) Queue(filter QueueFilter) []string
type ModelMetadata ¶
type PRISMACounts ¶
type PrioritizedRecord ¶
type PrioritizedRecord struct {
ID string `json:"id"`
Score float64 `json:"score"`
Uncertainty float64 `json:"uncertainty,omitempty"`
ExploitationScore float64 `json:"exploitationScore,omitempty"`
ExplorationScore float64 `json:"explorationScore,omitempty"`
Policy string `json:"policy,omitempty"`
}
PrioritizedRecord is an unscreened record plus its deterministic relevance score.
func PrioritizeActiveLearningRecords ¶
func PrioritizeActiveLearningRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage) []PrioritizedRecord
PrioritizeActiveLearningRecords is a deterministic ASReview-style scaffold: it ranks unscreened records higher when their title/abstract overlaps with included seed records and lower when they overlap with excluded seed records.
func PrioritizeBalancedRecords ¶
func PrioritizeBalancedRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage, policy BalancedPolicy) []PrioritizedRecord
func PrioritizeModelRecords ¶
func PrioritizeModelRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage) []PrioritizedRecord
PrioritizeModelRecords ranks unscreened records with a smoothed naive-Bayes text model.
func PrioritizeUncertaintyRecords ¶
func PrioritizeUncertaintyRecords(records []ScreeningRecord, events []DecisionEvent, stage Stage) []PrioritizedRecord
PrioritizeUncertaintyRecords ranks unscreened records closest to the model boundary.
type ProgressReport ¶
type ProgressReport struct {
Stage Stage `json:"stage"`
TotalRecords int `json:"totalRecords"`
ScreenedRecords int `json:"screenedRecords"`
Remaining int `json:"remaining"`
Conflicts int `json:"conflicts"`
Reviewers []ReviewerProgress `json:"reviewers"`
}
ProgressReport summarizes auditable human screening progress for one stage.
func Progress ¶
func Progress(events []DecisionEvent, stage Stage, totalRecords int) ProgressReport
Progress computes deterministic reviewer progress metrics for a stage.
type QueueFilter ¶
type RecallEffortPoint ¶
type RecallEffortPoint struct {
Screened int `json:"screened"`
Included int `json:"included"`
Recall float64 `json:"recall"`
}
RecallEffortPoint records cumulative recall over screening effort.
func RecallEffortCurve ¶
func RecallEffortCurve(events []DecisionEvent, stage Stage) []RecallEffortPoint
RecallEffortCurve computes a deterministic cumulative recall curve for one stage.
type RecallEffortSimulation ¶
type RecallEffortSimulation struct {
TotalRelevant int `json:"totalRelevant"`
Points []RecallEffortPoint `json:"points"`
Targets []RecallTargetResult `json:"targets"`
}
func SimulateRecallEffort ¶
func SimulateRecallEffort(ranked []PrioritizedRecord, relevantIDs []string, targets []float64) RecallEffortSimulation
type RecallTargetResult ¶
type ReviewerAssignment ¶
type ReviewerAssignment struct {
PaperID string `json:"paperId"`
Reviewer string `json:"reviewer"`
Stage Stage `json:"stage"`
}
func AssignReviewers ¶
func AssignReviewers(records []ScreeningRecord, reviewers []string, reviewersPerRecord int) []ReviewerAssignment
type ReviewerProgress ¶
type ReviewerProgress struct {
Reviewer string `json:"reviewer"`
Decisions int `json:"decisions"`
Included int `json:"included"`
Excluded int `json:"excluded"`
Uncertain int `json:"uncertain"`
}
ReviewerProgress summarizes one reviewer's work for a screening stage.
type ScreeningAuditBundle ¶
type ScreeningAuditBundle struct {
SchemaVersion string `json:"schemaVersion"`
Stage Stage `json:"stage"`
InputHash string `json:"inputHash"`
DecisionHash string `json:"decisionHash"`
Assignments []ReviewerAssignment `json:"assignments"`
Panel ConflictAdjudicationPanel `json:"conflictAdjudicationPanel"`
Uncertain []UncertainQueueItem `json:"uncertainQueue"`
Progress ProgressReport `json:"progress"`
ActiveRunRef string `json:"activeRunRef,omitempty"`
FrozenDataset []ScreeningRecord `json:"frozenDataset,omitempty"`
SeedLabels []DecisionEvent `json:"seedLabels,omitempty"`
RankingIterations []PrioritizedRecord `json:"rankingIterations,omitempty"`
ReviewerActions []DecisionEvent `json:"reviewerActions,omitempty"`
StoppingDiagnostics StoppingRecommendation `json:"stoppingDiagnostics"`
RandomSeeds []string `json:"randomSeeds,omitempty"`
ModelMetadata ModelMetadata `json:"modelMetadata"`
}
func BuildScreeningAuditBundle ¶
func BuildScreeningAuditBundle(input ScreeningAuditBundleInput) ScreeningAuditBundle
type ScreeningAuditBundleInput ¶
type ScreeningAuditBundleInput struct {
Records []ScreeningRecord
Events []DecisionEvent
Assignments []ReviewerAssignment
Stage Stage
ActiveRun ActiveLearningRun
}
type ScreeningRecord ¶
ScreeningRecord is the minimal text needed to prioritize records for human screening.
type StoppingRecommendation ¶
type StoppingRecommendation struct {
Stage Stage `json:"stage"`
TargetRecall float64 `json:"targetRecall"`
CurrentRecall float64 `json:"currentRecall"`
Screened int `json:"screened"`
Included int `json:"included"`
Unscreened int `json:"unscreened"`
CanStop bool `json:"canStop"`
Reason string `json:"reason"`
}
StoppingRecommendation summarizes whether observed screening can stop at a recall target.
func StoppingCriteria ¶
func StoppingCriteria(events []DecisionEvent, stage Stage, targetRecall float64, totalRecords int) StoppingRecommendation
StoppingCriteria evaluates a simple auditable recall threshold over observed decisions.
CurrentRecall is only ever measured over records already decided, so it reaches 1.0 as soon as a single Include exists — it is not an estimate of recall against the full candidate pool. totalRecords guards against recommending a stop while records outside "events" remain unscreened; richer recall estimation against an unscreened backlog is a deferred roadmap item (see opensource/inventory/asreview.md), not implemented here.
type UncertainQueueItem ¶
type UncertainQueueItem struct {
PaperID string `json:"paperId"`
Decisions []DecisionEvent `json:"decisions"`
}
func UncertainQueue ¶
func UncertainQueue(events []DecisionEvent, stage Stage) []UncertainQueueItem