Description Usage Arguments Examples
This will train a simple 'deep' neural network with two hidden layers. It will use an autoencoder for pretraining. For more information refer to the Shark tutorial at http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/deep_denoising_autoencoder_network.html
1 2 3 4 | DeepNetworkTrain(x, y, nHidden1 = 8L, nHidden2 = 8L,
unsupRegularisation = 0.001, noiseStrength = 0.3,
unsupIterations = 100L, regularisation = 1e-04, iterations = 200L,
verbose = FALSE)
|
x |
matrix with input data |
y |
vector with labels |
nHidden1 |
number of nodes of first hidden layer (part of network model) |
nHidden2 |
number of nodes of second hidden layer (part of network model) |
unsupRegularisation |
regularization factor of supervised training |
noiseStrength |
noise strength for unsupervised training |
unsupIterations |
iteration number for unsupervised training |
regularisation |
regularisation factor for supervised training |
iterations |
iteration number for supervised training |
verbose |
print extra information? |
1 2 3 4 5 6 7 8 9 | x = as.matrix(iris[,1:4])
y = as.vector(as.numeric(iris[,5]))
y = replace(y, y == 2, 0)
y = replace(y, y == 3, 0)
model = DeepNetworkTrain (x, y, nHidden1 = 32, nHidden2 = 32)
results = DeepNetworkPredict (x, model)
networkPrediction = apply (results$prediction, 1, which.max) - 1
errors = sum(abs(y - networkPrediction))/length(y)
cat("Network produced ", errors, "errors.\n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.