A KerasArchitecture is a parametrized abstraction of a keras model. It can be used to more easily and flexibly add architectures.

Initialize architecture

Obtain the model. Called by Learner during train().

Setter method for 'x_transform' and 'y_transform'.

Transform the features before passing them on to keras::fit().

Transform the target before passing it on to keras::fit().

This is an architecture used for custom, user-supplied models. The model, i.e a compiled keras model is supplied to the learner as a hyperparameter.

Arguments

y_transform

function
Function used to transform the targets for the model. Default depends on the task type. See y_transform for more information.

param_set

ParamSet
A methods / architecture's ParamSet.

build_arch_fun

Task
Function that instantiates and compiles a model.

x_transform

list
Function used to transform the data for the model.

name

character Either 'x' or 'y'.

transform

function
Function to set for the architecture

features

data.table
Function that convert the features to a form that can be passed on to keras::fit().

target

data.table
Function that convert the features to a form that can be passed on to keras::fit().

pars

list
Parameter values, i.e. self$param_set$get_values().

...

any
Additional args passed on to x_transform.

Fields

param_set

ParamSet
A method's \ architecture's ParamSet.

build_arch_fun

function
Function that instantiates and compiles a model.

transforms

list
The corresponding x- and y- transform.