Adjusted the classifier to reduce false flags
This commit is contained in:
@@ -229,9 +229,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"confidence_low": 0.6,
|
"confidence_low": 0.5,
|
||||||
"completeness_low": 0.5,
|
"completeness_low": 0.5,
|
||||||
"boundary_distance_low": 0.5
|
"boundary_distance_low": 0.3
|
||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"total_protocols": 406,
|
"total_protocols": 406,
|
||||||
|
|||||||
@@ -122,14 +122,18 @@ export class BicorderClassifier {
|
|||||||
const adjustedConfidence = confidence * (0.5 + 0.5 * completeness);
|
const adjustedConfidence = confidence * (0.5 + 0.5 * completeness);
|
||||||
|
|
||||||
// Recommend form
|
// Recommend form
|
||||||
// Use long form when:
|
// Use long form when multiple issues are present:
|
||||||
// 1. Low confidence (< 0.6)
|
// 1. Low confidence (< 0.5)
|
||||||
// 2. Low completeness (< 50% of dimensions)
|
// 2. Low completeness (< 50% of dimensions)
|
||||||
// 3. Near boundary (< 0.5 distance)
|
// 3. Near boundary (< 0.3 distance)
|
||||||
const shouldUseLongForm =
|
// Require at least 2 conditions to be true
|
||||||
adjustedConfidence < this.model.thresholds.confidence_low ||
|
const issues = [
|
||||||
completeness < this.model.thresholds.completeness_low ||
|
adjustedConfidence < this.model.thresholds.confidence_low,
|
||||||
distanceToBoundary < this.model.thresholds.boundary_distance_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';
|
const recommendedForm = shouldUseLongForm ? 'long' : 'short';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user