Add higher rank mode unrestricted to offline suggestions (#2711)

* Use unrestricted commonAncestorRankType for offline predictions from file

* The plugin provides an interface for this

* Fix type error

* Add missing type

* The iconic taxon is no longer part of the predictions result

If we use common ancestor rollup mode the ancestor taxa are no longer included in the result (which in turn are the top 10 species predictions). So, we have to get the iconic taxon name for each result in a different manner.

* Not needed as results are returned with highest score first

* Remove number wrapper

* Update comment

* There is no special offline not-confident criterion

This now returns common ancestor as top ID in case there is none over the threshold. So, same as online.

* No distinction between debug types

* Update ModelPrediction.js

* This is actually redundant

* Offline suggestions need to be sorted same as online

* Should not have removed the export

* Update comments
This commit is contained in:
Johannes Klein
2025-03-04 16:37:14 +01:00
committed by GitHub
parent 25d0ac7e22
commit 271d0bd856
8 changed files with 60 additions and 63 deletions

View File

@@ -14,3 +14,8 @@ export const MODE = {
BEST_BRANCH: "BEST_BRANCH",
COMMON_ANCESTOR: "COMMON_ANCESTOR"
};
export const COMMON_ANCESTOR_RANK_TYPE = {
MAJOR: "major",
UNRESTRICTED: "unrestricted"
};