prio-data / viewser

A CLI for interacting with the ViEWS 3 backend
Other
4 stars 0 forks source link

Model definition API #26

Closed Peder2911 closed 2 years ago

Peder2911 commented 3 years ago

Set up an API that, like Queryset definitions, makes it possible to define models through a simple API.

Peder2911 commented 3 years ago

The "model API" combines everything on offer in ViEWS code, letting users

  1. Fetch a queryset
  2. Train the model
  3. Store the model centrally for later reference
    model = Model(
    name="my_model",
    queryset="my_queryset",
    prediction_range=16, # (steps 1, 2 ... 16)
    estimator = RandomForestClassifier(),
    periodization = "my_periodization"
    )
    model.fetch()
    model.predictions # fetches or produces and stores
Peder2911 commented 2 years ago

After discussing this on Slack, we're going with a simpler "toolkit" approach. This won't be implemented.