setPyModel: Set python model

Description Usage Arguments

View source: R/pymodel.R

Description

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.

Usage

 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)

Arguments

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


Vitalic57/stratbuilder2pub documentation built on Dec. 18, 2019, 2:56 a.m.