To build a feedforward artificial neural network model with 1 hidden layer and present the key results of the model for predicting air blast waves based on the given hypothetical data, let's first translate the variables to English:
- Lb: Length of blasting column, m
- Wct: Bottom charge burden, m
- b: Distance between blastholes, m
- Q: Maximum total explosive charge per delay, Kg
- q: Explosive density, Kg/m3
- D: Distance of air blast wave monitoring, m
- AOP: Air blast wave overpressure, dB
My code:
library(readxl)
data <- read_excel("D:/data.xlsx")
View(data)
library(neuralnet)Split the data into training and test sets (80% for training, 20% for testing)
train_data <- data[1:80, c("Lb", "Wct", "b", "Q", "q", "D")]
train_labels <- data[1:80, "AOP"]
test_data <- data[81:nrow(data), c("Lb", "Wct", "b", "Q", "q", "D")]
test_labels <- data[81:nrow(data), "AOP"]Normalize the data (optional but recommended)
train_data_norm <- scale(train_data)
test_data_norm <- scale(test_data)Build the neural network model
model <- neuralnet(AOP ~ Lb + Wct + b + Q + q + D, data = train_data_norm, hidden = c(10))
Error in eval(predvars, data, env) : object 'AOP' not found
Can anyone help me complete this code? THANKS!