Use Case: Statistical Upward Propagation of Attributes

Summary

  • Scope: Plant Layer, Scraper
  • Level: Scraper Data
  • Actors: Developer
  • Brief: Plant attributes can be propagated from concrete plants to higher ranks, if they have a consistent value across all lower ranks
  • Status: Current
  • Assignee: Vseslav
  • Criticality: Important

Scenarios

  • Precondition:

    • Plant attributes and hierarchies have been inserted into the database via scraper.
    • A configurable propagation threshold is available.
    • The threshold is bigger than 50% (in order to avoid multiple equally frequent qualifying values).
    • Empty CSV values are interpreted as null.
  • Main success scenario:

    • The system starts at the lowest taxonomic rank (cultivar).
    • For each parent rank and each attribute independently, only non-null descendant values are considered.
    • Equal values are grouped.
    • For array attributes, arrays are compared as complete values while ignoring element order.
    • The most frequently occurring value is determined.
    • If its relative frequency among all non-null values reaches the configured threshold, that value is propagated to the parent.
    • Propagated values are treated as regular values during subsequent propagation to higher taxonomic ranks.
    • The process continues until the highest supported rank has been processed.
  • Alternative scenario:

    • A value does not reach the configured threshold, so no value is propagated.
  • Error scenario:

    • As the use case is implemented at build time (in the scraper), no run-time errors can occur.
  • Postcondition:

    • Higher taxonomic ranks contain propagated attribute values where sufficient consistency exists.
    • Original explicit attribute values remain unchanged.
  • Non-functional Constraints:

    • Propagation must be deterministic.
    • The propagation threshold must be configurable.

Development Progress

Notes

More info on hierarchy: doc/database/hierarchy.md

More info on plant attributes: ../assigned/plant_attributes.md