Learn R Programming

⚠️There's a newer version (6.0.1) of this package.Take me there.

cgraph (version 3.0.1)

Computational Graphs

Description

Allows to create, evaluate, and differentiate computational graphs in R. A computational graph is a graph representation of a multivariate function decomposed by its (elementary) operations. Nodes in the graph represent arrays while edges represent dependencies among the arrays. An advantage of expressing a function as a computational graph is that this enables to differentiate the function by automatic differentiation. The 'cgraph' package supports various operations including basic arithmetic, trigonometry operations, and linear algebra operations. It differentiates computational graphs by reverse automatic differentiation. The flexible architecture of the package makes it applicable to solve a variety of problems including local sensitivity analysis, gradient-based optimization, and machine learning.

Copy Link

Version

Install

install.packages('cgraph')

Monthly Downloads

56

Version

3.0.1

License

Apache License 2.0

Maintainer

Ron Triepels

Last Published

November 5th, 2018

Functions in cgraph (3.0.1)

cg_cos

Cosine
cg_cosh

Hyperbolic Cosine
cg_initialize

Computational Graph
cg_mean

Arithmetic Mean
cg_atanh

Inverse Hyperbolic Tangent
cg_max

Maxima
cg_acosh

Inverse Hyperbolic Cosine
cg_active

Change Active Graph
cg_colMeans

Column Means
cg_greater_equal

Greater or Equal
cg_add

Add
cg_abs

Absolute Value
cg_get_parms

Get Parameters
cg_exp

Exponential Function
cg_pmax

Parallel Maxima
cg_input

Add Input
cg_less

Less
acos_grad

Inverse Cosine Gradient
cg_adj_mat

Adjacency Matrix
atanh_grad

Inverse Hyperbolic Tangent Gradient
cg_pmin

Parallel Minima
bsum

Block Summation
cg_acos

Inverse Cosine
cg_asinh

Inverse Hyperbolic Sine
cg_const

Add Constant
cg_colSums

Column Sums
cg_div

Divide
cg_as_double

Coerce to a Numeric Vector
cg_rowMeans

Row Means
cg_rowSums

Row Sums
cg_add_parms

Add Parameters
cg_parm

Add Parameter
cg_sigmoid

Sigmoid
cg_equal

Equal
cg_sin

Sine
cg_sinh

Hyperbolic Sine
cg_as_numeric

Coerce to a Numeric Vector
cg_asin

Inverse Sine
cg_sub

Subtract
cg_sqrt

Square Root
div_grad_y

Divide Gradient
cg_crossprod

Matrix Crossproduct
equal_grad_x

Equal Gradient
cg_plot

Plot
gradients

Calculate Gradients
cg_default_library

Default Function Library
cg_atan

Inverse Tangent
greater_equal_grad_x

Greater or Equal Gradient
cg_pos

Positive
ln_grad

Natural Logarithm Gradient
cg_pow

Power
cg_gradients

Calculate Gradients
log10_grad

Logarithmic Base 10 Gradient
matmul_grad_y

Matrix Multiplication Gradient
cg_log2

Logarithm Base 2
cg_matmul

Matrix Multiplication
cg_sum

Sum of Vector Elements
const

Add Constant
cg_neg

Negative
cg_val

Evaluate a Node in the Graph
cg_greater

Greater
cos_grad

Cosine Gradient
cgraph

Computational Graph
input

Add Input
greater_grad_y

Greater Gradient
linear_grad_y

Linear Transformation Gradient
cg_less_equal

Less or Equal
cg_ln

Natural Logarithm
cg_log10

Logarithmic Base 10
colMeans_grad

Column Means Gradient
linear_grad_z

Linear Transformation Gradient
cg_not_equal

Not equal
reshape_grad_dim

Reshape Array Dimensions Gradient
cg_linear

Linear Transformation
reshape_grad_x

Reshape Array Dimensions Gradient
colSums_grad

Column Sums Gradient
cg_min

Minima
equal_grad_y

Equal Gradient
cg_mul

Multiply
exp_grad

Exponential Gradient Function
less_grad_x

Less Gradient
cg_not

Not
tanh_grad

Hyperbolic Tangent Gradient
cg_opr

Add Operation
tcrossprod_grad_x

Transpose Matrix Crossproduct Gradient
cg_t

Matrix Transpose
max_grad

Maxima Gradient
pmax_grad_x

Parallel Maxima Gradient
cg_run

Evaluate the Graph
cg_set

Change the Value of a Node in the Graph
cg_tan

Tangent
cg_prod

Product of Vector Elements
neg_grad

Negative Gradient
less_equal_grad_y

Less or Equal Gradient
less_equal_grad_x

Less or Equal Gradient
not_equal_grad_x

Not Equal Gradient
pmax_grad_y

Parallel Maxima Gradient
pow_grad_y

Power Gradient
cg_reshape

Reshape Array Dimensions
less_grad_y

Less Gradient
cg_tcrossprod

Transpose Matrix Crossproduct
cg_tanh

Hyperbolic Tangent
prod_grad

Product of Vector Elements Gradient
not_equal_grad_y

Not Equal Gradient
crossprod_grad_y

Matrix Crossproduct Gradient
div_grad_x

Divide Gradient
cosh_grad

Hyperbolic Cosine Gradient
rowMeans_grad

Row Means Gradient
sigmoid

Sigmoid
sub_grad_y

Subtract Gradient
rowSums_grad

Row Sums Gradient
crossprod_grad_x

Matrix Crossproduct Gradient
not_grad

Not Gradient
pmin_grad_x

Parallel Minima Gradient
log2_grad

Logarithmic Base 2 Gradient
pmin_grad_y

Parallel Minima Gradient
matmul_grad_x

Matrix Multiplication Gradient
greater_equal_grad_y

Greater or Equal Gradient
mul_grad_x

Multiply Gradient
run

Evaluate the Graph
set

Change the Value of a Node in the Graph
greater_grad_x

Greater Gradient
mul_grad_y

Multiply Gradient
sum_grad

Sum of Vector Elements Gradient
sigmoid_grad

Sigmoid Gradient
linear

Linear Transformation
opr

Add Operation
parm

Add Parameter
linear_grad_x

Linear Transformation Gradient
sqrt_grad

Square Root Gradient
tcrossprod_grad_y

Transpose Matrix Crossproduct Gradient
val

Evaluate a Node in the Graph
sub_grad_x

Subtract Gradient
mean_grad

Arithmetic Mean Gradient
min_grad

Minima Gradient
pos_grad

Positive Gradient
pow_grad_x

Power Gradient
sin_grad

Sine Gradient
sinh_grad

Hyperbolic Sine Gradient
t_grad

Matrix Transpose Gradient
tan_grad

Tangent Gradient
as_double_grad

Coerce to a Numeric Vector Gradient
asin_grad

Inverse Sine Gradient
add_grad_y

Add Gradient
approx_grad

Approximate Gradients
abs_grad

Absolute Value Gradient
acosh_grad

Inverse Hyperbolic Cosine Gradient
add_grad_x

Add Gradient
asinh_grad

Inverse Hyperbolic Sine Gradient
atan_grad

Inverse Tangent Gradient