Skip to content

Commit

Permalink
Adjust prototype D to include mapping feature from Prototype B
Browse files Browse the repository at this point in the history
  • Loading branch information
JPrevost committed Sep 4, 2024
1 parent fbf1a76 commit f966ea5
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions docs/reference/classes-prototype-d.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit f966ea5

Please sign in to comment.