mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-18 15:01:28 +00:00
apparently classifier may return NaN
This commit is contained in:
@@ -315,10 +315,10 @@ class Af_Sort_Bayes extends Plugin {
|
|||||||
$prob_good = $result[$id_good];
|
$prob_good = $result[$id_good];
|
||||||
$prob_bad = $result[$id_bad];
|
$prob_bad = $result[$id_bad];
|
||||||
|
|
||||||
if ($prob_good > 0.90) {
|
if (!is_nan($prob_good) && $prob_good > 0.90) {
|
||||||
$dst_category = $id_good;
|
$dst_category = $id_good;
|
||||||
$article["score_modifier"] += $this->score_modifier;
|
$article["score_modifier"] += $this->score_modifier;
|
||||||
} else if ($prob_bad > 0.90) {
|
} else if (!is_nan($prob_bad) && $prob_bad > 0.90) {
|
||||||
$dst_category = $id_bad;
|
$dst_category = $id_bad;
|
||||||
$article["score_modifier"] -= $this->score_modifier;
|
$article["score_modifier"] -= $this->score_modifier;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user