R Script Neutral Network

In this R script I applied a neural network model to the Spambase dataset for spam email detection.

After loading and cleaning the dataset, the data is split into training and testing sets. The script

scales the data and then builds and evaluates two neural network models: a simple model with

10 hidden units and a more complex model with 3 layers of hidden units (sizes 5, 3, and 4).

Predictions are made on both the training and test sets, with error rates calculated to evaluate

model performance. The second, more complex model significantly reduces the error rate on

both the training and test sets.

Previous
Previous

R Script Sentiment

Next
Next

R Script Hierarchical K Means