Skip to contents

This is a convenience utility for packing data into the list formats that fit() uses.

Usage

pack_x_y_sample_weight(x, y = NULL, sample_weight = NULL)

Arguments

x

Features to pass to Model.

y

Ground-truth targets to pass to Model.

sample_weight

Sample weight for each element.

Value

List in the format used in fit().

Example

x <- op_ones(c(10, 1))
data <- pack_x_y_sample_weight(x)


y <- op_ones(c(10, 1))
data <- pack_x_y_sample_weight(x, y)