Description Usage Arguments Details Value Examples
This function runs an interactive dashboard which computes the 1st and 2nd symbolic derivatives of the loss function (gradient/hessian) provided, for up to 4 functions simultaneously without interrupting if you input a bad function.
1 2 3 4 5 6 7 8 | interactive.SymbolicLoss(f1 = "(x, y) {(x - y) ^ 2}",
f2 = "(x, y) {(y * log(x) + (1 - y) * log(1 - x))}",
f3 = "(x, y) {(x - y * log(x)) + (y * log(y) - y)}",
f4 = "(x, y) {(y - x) * log(y / x)}", f1_init = c(-20, 20, 50, 0),
f2_init = c(0.01, 0.99, 50, 1), f3_init = c(0, 100, 100, 20),
f4_init = c(0, 100, 100, 20), f1_back = "yellow", f2_back = "aqua",
f3_back = "olive", f4_back = "purple", f_back = "red", type = "o",
max_height = 580)
|
f1 |
Type: character. A string describing the first loss function, with potentially multiple arguments. Requires at least |
f2 |
Type: character. A string describing the second loss function, with potentially multiple arguments. Requires at least |
f3 |
Type: character. A string describing the third loss function, with potentially multiple arguments. Requires at least |
f4 |
Type: character. A string describing the fourth loss function, with potentially multiple arguments. Requires at least |
f1_init |
Type: numeric vector of length 4. A vector containing sequentially the minimum, the maximum, the number of points, and the y value for the plots of the first loss function. Defaults to |
f2_init |
Type: numeric vector of length 4. A vector containing sequentially the minimum, the maximum, the number of points, and the y value for the plots of the second loss function. Defaults to |
f3_init |
Type: numeric vector of length 4. A vector containing sequentially the minimum, the maximum, the number of points, and the y value for the plots of the third loss function. Defaults to |
f4_init |
Type: numeric vector of length 4. A vector containing sequentially the minimum, the maximum, the number of points, and the y value for the plots of the fourth loss function. Defaults to |
f1_back |
Type: character. A background color character for the first function. Defaults to |
f2_back |
Type: character. A background color character for the second function. Defaults to |
f3_back |
Type: character. A background color character for the third function. Defaults to |
f4_back |
Type: character. A background color character for the fourth function. Defaults to |
f_back |
Type: character. A background color character for the header. Defaults to |
type |
Type: character. The type of plot to use for plots. |
max_height |
Type: numeric. The maximum height for the plots. Defaults to |
This function cannot handle any type of input. It cannot handle sums or loops in the function code. It handles the following, in the alphabetic order:
Multiplication
Division
Power
Absolute value function
Arcosine function
Hyperbolic Arcosine function
Arsine function
Hyperbolic Arcsine function
Arctangent function
Arctangent angle function between the x-axis and the vector from the origin (x,y), atan=y/x if x>0 and y>0
Hyperbolic Arctangent function
Modified Bessel function of the first kind
Bessel function of the first kind
Modified Bessel function of the second kind
Sphereical Bessel function
Beta function (Eulerian integral of the first kind)
Cosine function
Hyperbolic cosine function
Cosine function with argument multiplicand pi
Density binomial function
First derivative of the logarithm of the gamma function
Density normal function
Exponential function
Exponential function minus 1
Gamma function (Mellin transform of the negative exponential function)
Natural logarithm of the beta function
Natural logarithm of the absolute value of the gamma function
Natural (e) logarithm function
Common (10) logarithm function
Natural (e) logarithm function with 1 added to the argument
Binary (2) logarithm function
Logarithm function of base b (base)
Normal distribution function
Polygamma function (degree specified by deriv)
Replicate "times" elements of vectors and lists
Replicate "length.out" elements of vectors and lists
Sign function
Sine function
Hyperbolic sine function
Sine function with argument multiplicand pi
Square root function
Tangent function
Hyperbolic tangent function
Tangent function with argument multiplicand pi
Second derivative of the logarithm of the gamma function
The colors (non header: f1_back
, f2_back
, f3_back
, f4_back
) allowed are the following:
red color
yellow color
aqua color
blue color
light-blue color
green color
navy color
teal color
olive color
lime color
orange color
fuchsia color
purple color
maroon color
black color
The colors (header: f_back
) allowed are the following:
blue color
black color
purple color
green color
red color
yellow color
Nothing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
interactive.SymbolicLoss(f1 = "(x, y) {(x - y) ^ 2}",
f2 = "(x, y) {(y * log(x) + (1 - y) * log(1 - x))}",
f3 = "(x, y) {(x - y * log(x)) + (y * log(y) - y)}",
f4 = "(x, y) {(y - x) * log(y / x)}",
f1_init = c(-20, 20, 50, 0),
f2_init = c(0.01, 0.99, 50, 1),
f3_init = c(0, 100, 100, 20),
f4_init = c(0, 100, 100, 20),
f1_back = "yellow",
f2_back = "aqua",
f3_back = "olive",
f4_back = "purple",
f_back = "red",
type = "o",
max_height = 580)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.