knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

This note lays out the API for models in the package.

TODO:


Four basic functions:

  1. Low-level interface like low_level_func(). This is simply an interface that allows calling whatever the actual model implementation is with two x and y arguments.
  2. Predict method for low-level interface, like predict.low_level_func().
  3. A DS wrapper like ds_low_level_funct(). This wrapper takes care of two things:
  4. getting whatever representation of the DV is needed
  5. estimating the appropriate models using the low-level interface, e.g. for the one-hot binary classification approach, it estimates models for "up" and "down" movements
  6. Predict method for the DS wrapper. This turns the DV representation-specific model into a common and consistent prediction with probabilities for up/same/down.

Low-level interface

low_level_func():

Predict method for low-level interface

predict.low_level_func()

DS wrapper

ds_low_level_func():

The DS wrapper takes the full country-year data and turns it into usable data given the DV representation needed by a lower-level model. To this end, it extracts the relevant DV variable(s) and creates a data set version that consists of features only.

Predict method for DS wrapper

predict.ds_low_level_func()



andybega/demspaces documentation built on April 18, 2021, 11:05 p.m.