Change default IQR multiplier to 1.0 for more aggressive outlier filtering
- Change ANALYSIS_IQR_MULTIPLIER default from 1.5 to 1.0 in config.py - Add iqr_multiplier parameter to all filtering & statistics functions - Allow runtime override via MCP tools (get_valuation_comparables, get_deal_statistics) - Update CLAUDE.md docs with new default & override examples Rationale: k=1.0 catches more suspicious deals (e.g. 43% below median) while still preserving legitimate edge cases via hard bounds. Users can override per-call for more conservative filtering (k=1.5) if needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -873,7 +873,9 @@ class GovmapClient:
|
||||
)
|
||||
|
||||
# Statistics methods (delegate to statistics module)
|
||||
def calculate_deal_statistics(self, deals: List[Deal]) -> DealStatistics:
|
||||
def calculate_deal_statistics(
|
||||
self, deals: List[Deal], iqr_multiplier: Optional[float] = None
|
||||
) -> DealStatistics:
|
||||
"""
|
||||
Calculate statistical aggregations on deal data.
|
||||
|
||||
@@ -881,11 +883,12 @@ class GovmapClient:
|
||||
|
||||
Args:
|
||||
deals: List of Deal model instances
|
||||
iqr_multiplier: Override IQR multiplier for outlier detection (optional)
|
||||
|
||||
Returns:
|
||||
DealStatistics model with comprehensive metrics
|
||||
"""
|
||||
return statistics.calculate_deal_statistics(deals)
|
||||
return statistics.calculate_deal_statistics(deals, iqr_multiplier=iqr_multiplier)
|
||||
|
||||
def _calculate_std_dev(self, values: List[float]) -> float:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user