learn_gd13: Learn Gradient Descent in 13 lines

Description Usage Arguments References See Also Examples

View source: R/learn_gd.R

Description

Learn Gradient Descent in 13 lines

Usage

1
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

1
2
3
4
5
6
7
8
# 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)

learNN documentation built on May 29, 2017, 9 a.m.