Learn R Programming

learNN (version 0.2.0)

learn_gd13: Learn Gradient Descent in 13 lines

Description

Learn Gradient Descent in 13 lines

Usage

learn_gd13(X, y, alpha, hidden_dim)

Arguments

X
input data
y
output data
alpha
alpha to be used
hidden_dim
dimension of the hidden layer

References

http://qua.st/handcoding-gradient-descent/ http://iamtrask.github.io/2015/07/27/python-network-part2/

See Also

learn_gd

Examples

Run this code
# create new data
alpha = 0.5
hidden_dim = 4
X = matrix(c(0,0,1,0,1,1,1,0,1,1,1,1), nrow=4, byrow=TRUE)
y = matrix(c(0,1,1,0),nrow=4)

# run 13 lines function
learn_gd13(X, y, alpha, hidden_dim)

Run the code above in your browser using DataLab