Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create "Register van Algoritmen" endpoint #261

Open
robbertbos opened this issue Oct 28, 2024 · 1 comment
Open

Create "Register van Algoritmen" endpoint #261

robbertbos opened this issue Oct 28, 2024 · 1 comment
Assignees

Comments

@robbertbos
Copy link
Member

robbertbos commented Oct 28, 2024

For the Digilab Fieldlab, we need to create a (mock) endpoint for a register of algorithms. It is fine to start with a single datablob that represents a single algorithm.

This algorithm should be a ruleset from regels.overheid.nl

The blob could look like this but should contain an ACTUAL ruleset from regels.overheid.nl:
(NOTE: this is an example made up, just to give an impression, dataModel and ruleModel will likely change based on discussions with regels.overheid.nl).

{
  "id": "RVA-001",
  "algorithmName": "High Income Tax Calculation",
  "registerLink": "regels.overheid.nl/RVA-001",
  "dataModel": {
    "objectTypes": [
      {
        "name": "Taxpayer",
        "attributes": [
          {
            "name": "annualIncome",
            "dataType": "Numeric"
          },
          {
            "name": "taxAmount",
            "dataType": "Numeric"
          }
        ],
        "characteristics": [
          "isHighIncome"
        ]
      }
    ],
    "parameters": [
      {
        "name": "standardDeduction",
        "dataType": "Numeric"
      },
      {
        "name": "taxRate",
        "dataType": "Percentage"
      }
    ]
  },
  "ruleModel": {
    "ruleGroups": [
      {
        "name": "IncomeTaxCalculation",
        "rules": [
          {
            "name": "HighIncomeCharacteristic",
            "type": "CharacteristicAssignment",
            "validity": {
              "startDate": "2024-01-01",
              "endDate": "2024-12-31"
            },
            "content": {
              "subject": {
                "objectType": "Taxpayer"
              },
              "characteristic": "isHighIncome",
              "condition": {
                "operator": "greaterThan",
                "leftOperand": {
                  "objectType": "Taxpayer",
                  "attribute": "annualIncome"
                },
                "rightOperand": {
                  "value": 100000
                }
              }
            }
          },
          {
            "name": "TaxAmountCalculation",
            "type": "Equality",
            "validity": {
              "startDate": "2024-01-01",
              "endDate": "2024-12-31"
            },
            "content": {
              "leftOperand": {
                "objectType": "Taxpayer",
                "attribute": "taxAmount"
              },
              "rightOperand": {
                "operation": "multiplication",
                "operands": [
                  {
                    "operation": "subtraction",
                    "operands": [
                      {
                        "objectType": "Taxpayer",
                        "attribute": "annualIncome"
                      },
                      {
                        "parameter": "standardDeduction"
                      }
                    ]
                  },
                  {
                    "parameter": "taxRate"
                  }
                ]
              },
              "condition": {
                "subject": {
                  "objectType": "Taxpayer"
                },
                "characteristic": "isHighIncome"
              }
            }
          }
        ]
      }
    ]
  }
}

The url of the blob should be communicated to Digilab (through Anne).

There should be data to fill the top part of this screen:
Image

implementation notes

  • a new repository with a single file (and possibly a schema) is enough for this ticket
  • we would communicate the raw url to this file
  • note: dataModel and ruleModel are likely to change from the example above, based on discussions with regels.overheid.nl
  • the format is json
  • onnx models out of scope for now, but important to choose a format that could support it
@robbertbos robbertbos converted this from a draft issue Oct 28, 2024
@laurensWe laurensWe self-assigned this Nov 14, 2024
@laurensWe
Copy link
Member

@laurensWe laurensWe removed their assignment Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants