NeuralNetwork-class {deep}R Documentation

The main NeuralNetwork class, that holds the layers.

Description

The main NeuralNetwork class, that holds the layers.

Fields

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.

Examples

# 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])


[Package deep version 0.1.0 Index]