Adjusted the classifier to reduce false flags
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user