wQloss: wQloss function

Description Usage Arguments Value References See Also Examples

View source: R/cost_functions.R

Description

A function to evaluate the weighted quadratic loss function and the derivative of this function to be used when training a neural network.

Usage

1
wQloss(w)

Arguments

w

a vector of weights, adding up to 1, whose length is equalt to the output length of the net

Value

a list object with elements that are functions, evaluating the loss and the derivative

References

  1. Ian Goodfellow, Yoshua Bengio, Aaron Courville, Francis Bach. Deep Learning. (2016)

  2. Terrence J. Sejnowski. The Deep Learning Revolution (The MIT Press). (2018)

  3. Neural Networks YouTube playlist by 3brown1blue: https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi

  4. http://neuralnetworksanddeeplearning.com/

See Also

network, train, backprop_evaluate, MLP_net, backpropagation_MLP, multinomial, no_regularisation, L1_regularisation, L2_regularisation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Example in context:


netwts <- train(dat=train_set,
                truth=truth,
                net=net,
                eps=0.001,
                tol=0.95,
                loss=wQloss(c(10,5,6,9)), # here assuming output of length 4
                batchsize=100)

deepNN documentation built on March 13, 2020, 2:24 a.m.