diff --git a/docs/reference/classes-prototype-d.md b/docs/reference/classes-prototype-d.md index 4b74bbb..138b0ba 100644 --- a/docs/reference/classes-prototype-d.md +++ b/docs/reference/classes-prototype-d.md @@ -25,13 +25,17 @@ tables in the diagrams below. ```mermaid classDiagram - direction LR Term "1" --> "1..*" Detection - Detector "1" --> "0..*" Detection Term "1" --> "0..*" Categorization + Detection "0..*" --> "1" Detector + + DetectionCategory "0..*" --> "1" Category + Categorization "0..*" --> "1" Category + Detector "1" --> "0..*" DetectionCategory + class Term Term: +Integer id Term: +String phrase @@ -68,10 +72,20 @@ classDiagram Categorization: +Integer term_id Categorization: +Float confidence + class DetectionCategory + DetectionCategory: +Integer id + DetectionCategory: +Integer detector_id + DetectionCategory: +Integer category_id + DetectionCategory: +Float confidence + DetectionCategory: incrementConfidence() + DetectionCategory: decrementConfidence() + + style Term fill:#000,stroke:#66c2a5,color:#66c2a5 style Category fill:#000,stroke:#fc8d62,color:#fc8d62 style Categorization fill:#000,stroke:#8da0cb,color:#8da0cb + style DetectionCategory fill:#000,stroke:#fc8d62,color:#fc8d62 style Detector fill:#000,stroke:#fc8d62,color:#fc8d62 style Detection fill:#000,stroke:#8da0cb,color:#8da0cb @@ -92,9 +106,12 @@ Unsolved in this model: one Detector (so far) has `Categories` built into the `D ### Calculating the category scores -One interesting feature of Detector is that it stores the confidence of each algorithm to accurately predict a category. During validation, if a Detection made by an algorithm is confirmed, we can run `incrementConfidence()` whatever that ends up meaning. Similarly, if an Detection is validated as inaccurate, we can run `decrementConfidence()`. +One interesting feature of DetectionCategory is that it stores the confidence of each algorithm to accurately predict a category. During validation, if a Detection made by an algorithm is confirmed, we can run `incrementConfidence()` whatever that ends up meaning. Similarly, if an Detection is validated as inaccurate, we can run `decrementConfidence()`. + +> [!NOTE] +>DetectionCategory is a join table represented in Prototype B as `mapping`. This tries to nudge it towards a better name. -Note: Prototype B likely has this feature as well, and has a mapping table between Detector and Category which makes a lot of sense. The confidence is likely actually part of the join table and not part of the Detector itself. Some detectors are themselves non-binary in terms of predection so it is possible that there should be confidence stored for each (namely JournalName detection is fairly weak compared to many other algorithms to date) +Some detectors are themselves non-binary in terms of prediction so they maintain a confidence level as well (namely JournalName detection is fairly weak compared to many other algorithms to date) ## Validations