Skip to contents

This class is used to create visualizations of loss functions.

Public fields

loss_function

[LossFunction]
Loss function.

loss

(`numeric()`)
Loss values.

y_pred

`numeric()`
Predicted values.

Methods


Method new()

Creates a new instance of this [R6][R6::R6Class] class.

Usage

VisualizerLossFunction$new(loss_function, y_pred, y_true, ...)

Arguments

loss_function

[LossFunction]
Loss function.

y_pred

(`numeric()`)
Predicted values.

y_true

(`numeric(1)`)
True value.

...

(`any`)
Additional arguments passed to the loss function.


Method init_layer_lines()

Initialize the plot with a line plot.

Usage

VisualizerLossFunction$init_layer_lines(
  width = 2,
  color = "rgb(160,82,45)",
  ...
)

Arguments

width

(`integer(1)`)
Width of the line.

color

(`character(1)`)
Color of the line.

...

(`any`)
Further arguments passed to `add_trace(...)`.


Method set_layout()

Set the layout of the plotly plot.

Usage

VisualizerLossFunction$set_layout(...)

Arguments

...

(`any`)
Layout options directly passed to `layout(...)`.


Method plot()

Return the plot and hence plot it or do further processing.

Usage

VisualizerLossFunction$plot()


Method save()

Save the plot by using plotlys `orca()` function.

Usage

VisualizerLossFunction$save(...)

Arguments

...

(`any`)
Further arguments passed to `orca()`.


Method clone()

The objects of this class are cloneable with this method.

Usage

VisualizerLossFunction$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.