create_model {processpredictR}R Documentation

Define transformer model

Description

Defines the model using the keras functional API. The following 4 process monitoring tasks are defined:

Usage

create_model(
  x_train,
  custom = FALSE,
  num_heads = 4,
  output_dim_emb = 36,
  dim_ff = 64,
  ...
)

Arguments

x_train

data.frame: A processed data.frame from prepare_examples().

custom

logical (default FALSE): If TRUE, returns a custom model.

num_heads

A number of attention heads of the keras::layer_embedding().

output_dim_emb

Dimension of the dense embedding of the keras::layer_embedding().

dim_ff

Dimensionality of the output space of the feedforward network part of the model (units argument of the keras::layer_dense()).

...

you can pass additional arguments to keras::keras_model() (ex.: name argument).

Value

An object of class ppred_model and list containing a Transformer model (returned by keras::keras_model()) and some additional useful metrics.


[Package processpredictR version 0.1.0 Index]