User can create realization of python class Model inherited from BaseModel. All dependencies user should specify in Dockerfile, then with help of addDocker push docker to gitlab.
1 2 3 4 5 6 7 8 9 10 11 | setPyModel(this, pyfile, dockername, lookback_init, lookback_step = 0,
lookback = 0, data = quote(spread), pathwise = FALSE, as = "signal",
hostname = "localhost", modelpath = NULL, update_with_betas = FALSE,
vector_step = FALSE, args = list(), port = 4000)
## S3 method for class 'modelStrategy'
setPyModel(this, pyfile, dockername, lookback_init,
lookback_step = 0, lookback = 0, data = quote(spread),
pathwise = FALSE, as = "signal", hostname = "localhost",
modelpath = NULL, update_with_betas = FALSE, vector_step = FALSE,
args = list(), port = 4000)
|
this |
modelStrategy |
pyfile |
character, path to .py file |
dockername |
character, name of docker container |
lookback_init |
numeric, periods of time for training the model |
lookback_step |
numeric, periods of time for step of the model |
lookback |
numeric, how many periods need to be to evaluate data expression |
data |
quote, expression that returns numeric vector or matrix |
pathwise |
logical, if TRUE then http requests will be send on each iteration |
as |
character, name of variable that will contains results of model evaluation |
hostname |
character, name of host. |
modelpath |
character, path to pretrained model |
update_with_betas |
logical, by default FALSE. If TRUE then model will be reinit after reinitilization of betas weights |
vector_step |
logical, if TRUE then model.py file should have ability to take vector to step and output vector after predict |
args |
list, list of arguments for python file |
port |
numeric, port for docker container |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.