diff --git a/analysis/bicorder_model.json b/analysis/bicorder_model.json index 864564a..7899e17 100644 --- a/analysis/bicorder_model.json +++ b/analysis/bicorder_model.json @@ -229,9 +229,9 @@ ] }, "thresholds": { - "confidence_low": 0.6, + "confidence_low": 0.5, "completeness_low": 0.5, - "boundary_distance_low": 0.5 + "boundary_distance_low": 0.3 }, "metadata": { "total_protocols": 406, diff --git a/bicorder-app/src/bicorder-classifier.ts b/bicorder-app/src/bicorder-classifier.ts index d6dfc79..d253e22 100644 --- a/bicorder-app/src/bicorder-classifier.ts +++ b/bicorder-app/src/bicorder-classifier.ts @@ -122,14 +122,18 @@ export class BicorderClassifier { const adjustedConfidence = confidence * (0.5 + 0.5 * completeness); // Recommend form - // Use long form when: - // 1. Low confidence (< 0.6) + // Use long form when multiple issues are present: + // 1. Low confidence (< 0.5) // 2. Low completeness (< 50% of dimensions) - // 3. Near boundary (< 0.5 distance) - const shouldUseLongForm = - adjustedConfidence < this.model.thresholds.confidence_low || - completeness < this.model.thresholds.completeness_low || - distanceToBoundary < this.model.thresholds.boundary_distance_low; + // 3. Near boundary (< 0.3 distance) + // Require at least 2 conditions to be true + const issues = [ + adjustedConfidence < this.model.thresholds.confidence_low, + completeness < this.model.thresholds.completeness_low, + distanceToBoundary < this.model.thresholds.boundary_distance_low + ]; + const issueCount = issues.filter(Boolean).length; + const shouldUseLongForm = issueCount >= 2; const recommendedForm = shouldUseLongForm ? 'long' : 'short';