-
Notifications
You must be signed in to change notification settings - Fork 2
/
mvp-api.R
49 lines (38 loc) · 1.28 KB
/
mvp-api.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# For a minimum viable product, here is what we need
# objects we need are:
covariate_rasters
training_data
list_of_l0_models
inla_mesh_setup
# so the covariate_raster object should contain all the covariates that they
# care about (coffee, coconut)
covariate_rasters
# they need to format the training data into the format that we require
# e.., expected column names
# lat/long/no_mosquitoes_tested/no_mosquitoes_died/
training_data
# List of L0 models
# could just be a character vector c('randomForest', 'xgboost', 'cart')
# as well as hyperparameter settings as well?
# but they default to penny's...or something
list_of_l0_models
# inla_mesh_setup
# this will need to match the covariate_raster shape
inla_mesh_setup
# two functions we use:
## model_validation
## spatial_prediction
model_validation(covariate_rasters,
training_data,
list_of_l0_models,
inla_mesh_setup)
# evaluation/diagnostics tool set
## Maybe all the model validation stuff can be in the output of these
# does the same thing but makes prediction to raster
# making maps
spatial_prediction(covariate_rasters,
training_data,
list_of_l0_models,
inla_mesh_setup)
# In the back end
# We can run a targets workflow