feat: add outlier score formula and save decision
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
8dbb0cf9ce
commit
b52c847068
@@ -0,0 +1,9 @@
|
||||
export function computeScore(views, subscribers) {
|
||||
if (subscribers === null || subscribers === undefined) return null;
|
||||
return Math.round((views / Math.max(subscribers, 1)) * 100) / 100;
|
||||
}
|
||||
|
||||
export function shouldSave({ views, score, vidiqScore }, { threshold, minViews }) {
|
||||
if (vidiqScore !== null && vidiqScore !== undefined) return true;
|
||||
return score !== null && score !== undefined && views >= minViews && score >= threshold;
|
||||
}
|
||||
Reference in New Issue
Block a user