plot.sgd: Plot objects of class 'sgd'.

View source: R/plot.sgd.R

plot.sgdR Documentation

Plot objects of class sgd.

Description

Plot objects of class sgd.

Usage

## S3 method for class 'sgd'
plot(x, ..., type = "mse", xaxis = "iteration")

## S3 method for class 'list'
plot(x, ..., type = "mse", xaxis = "iteration")

Arguments

x

object of class sgd.

...

additional arguments used for each type of plot. See ‘Details’.

type

character specifying the type of plot: "mse", "clf", "mse-param". See ‘Details’. Default is "mse".

xaxis

character specifying the x-axis of plot: "iteration" plots the y values over the log-iteration of the algorithm; "runtime" plots the y values over the time in seconds to reach them. Default is "iteration".

Details

Types of plots available:

mse

Mean squared error in predictions, which takes the following arguments:

x_test

test set

y_test

test responses to compare predictions to

clf

Classification error in predictions, which takes the following arguments:

x_test

test set

y_test

test responses to compare predictions to

mse-param

Mean squared error in parameters, which takes the following arguments:

true_param

true vector of parameters to compare to


airoldilab/sgd documentation built on Feb. 9, 2024, 8:10 p.m.