feat: Add z-score based outlier detection for PR reviews #14
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.
Summary
Implements statistical outlier detection to identify unusual PR reviews using z-scores calculated per repository on both raw metrics and engineered features.
This PR adds comprehensive outlier detection capabilities to analyze PR review quality and identify potential issues such as:
Key Features
1. Feature Engineering
2. Statistical Analysis
3. Outlier Detection
4. New CLI Command
5. Multiple Output Formats
Database Schema
New Tables
prfeatures: Stores computed features for each PRproutlierscore: Stores z-scores and outlier flagsTesting
Example Usage
Technical Implementation
Modules Added
src/review_classification/features/engineering.py: Feature computationsrc/review_classification/analysis/statistics.py: Statistical functionssrc/review_classification/analysis/outlier_detector.py: Detection logicsrc/review_classification/cli/output.py: Result formattingDatabase Functions
save_pr_features(): Upsert computed featuresget_pr_features(): Retrieve features for a PRget_outlier_scores(): Query outlier resultsVerification
After merging, users can:
🤖 Generated with Claude Code