Guru's Verification engine ensures consistency, confidence, and trust in the knowledge your organization shares. Learn more.

R | `neuralnet` Package

The neuralnet package for R offers a quick way to create simple neural nets for educational purposes:

library(neuralnet)training_data <- read.csv("https://raw.githubusercontent.com/jcha-ultra/data_toolkit/master/datasets/roots.csv", header = TRUE)model <- neuralnet(formula = root_k ~ k, data = training_data, hidden = 10)output <- cbind(training_data, nn_output = unlist(model$net.result))

However, this package is not suitable for production-level modeling work, for the following reasons:

  • it is not optimized for speed, as the package documentation itself states

  • it has limited options for configuring the neural net's hyperparameters and architecture

  • it does not provide the option to expose the internal workings of the neural net and make fine adjustments to it

A more full-fledged framework for creating neural nets is Keras, which is built on top of Google's Tensorflow and has an R interface [2].

Footnotes/Resources:

You must have Author or Collection Owner permission to create Guru Cards. Contact your team's Guru admins to use this template.