Posts

Showing posts from April, 2020

Neural Network Prediction Modeling for Predicting Graduate Admissions And Using Confusion Matrix to Check Its Validity in R

The program code is used for predicting Graduate Admissions which uses the Neural Network Prediction Model and Cross-validation to split the dataset into training and testing data and the Confusion Matrix to check its validity. The dataset was downloaded from www.kaggle.com, below is the dataset download link; https://www.kaggle.com/mohansacharya/graduate-admissions library(neuralnet) setwd("C:\\Users\\LENOVO\\Desktop\\Neural") admission <- read.csv("admission.csv", header = TRUE) admission str(admission) normalize <- function(x) {   return((x - min(x)) / (max(x) - min(x))) } maxin <- as.data.frame(lapply(admission, normalize)) maxin trainset <- maxin[1:400,] #trainset testset <- maxin[401:500,] nn <- neuralnet(Chance ~ GRE + TOEFL + SOP + LOR + CGPA + Research, data=trainset,                 hidden =c(4,2), linear.output = FALSE) nn$result.matrix plot(nn) temp_test <- subset(testset, select = c(...