-
-
Save rvndbalaji/80a8d9271a1568a1040a1ec86cc4bc8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install the pakages if you haven't already done so | |
install.packages('nnet') | |
nnet = neuralnet(Occupancy ~ Temperature + Humidity + Light + CO2 + HumidityRatio,data=train,linear.output = FALSE,hidden = c(3,2)) | |
#Predicted values | |
pred = compute(nnet,test[,-6]) | |
pred = pred$net.result | |
#From the graph, for all predictions greater than 0.7 1 else 0 | |
pred[pred>=0.7] = 1 | |
pred[pred<0.7] = 0 | |
pred = factor(pred) | |
plot(pred) | |
print(round(perf(pred,test$Occupancy),5)* 100) | |
#Output : 0.9556757727 | |
#Execution Time : 1.6 minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment