The main NeuralNetwork class, that holds the layers.
eta
The learning tax, representes the size of the weight adjustment between each epoch of training.
layers
This field is a list of the layers of the network, you can use subsetting to inspect them.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Create a dataset
dataset <- iris
dataset$Petal.Length <- NULL
dataset$Petal.Width <- NULL
dataset <- dataset[dataset$Species != "versicolor",]
dataset$Code <- as.integer(dataset$Species == "virginica")
dataset <- dataset[sample(20),]
# Create the network
net <- neuralNet(2, perceptronLayer(1))
# Train the network, takes a while
net$train(dataset[,c(1,2), drop=FALSE], dataset[,'Code', drop=FALSE], epochs = 10)
# Check the output
net$compute(c(1,2))
# See accuracy
net$validationScore(dataset[,c(1,2), drop=FALSE], dataset[,'Code', drop=FALSE])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.