Skip to content

Instantly share code, notes, and snippets.

View neelsoumya's full-sized avatar

Soumya Banerjee neelsoumya

View GitHub Profile
@neelsoumya
neelsoumya / neuralnetR.R
Created May 16, 2022 05:46 — forked from mick001/neuralnetR.R
A neural network exaple in R. Full article at: http://datascienceplus.com/fitting-neural-network-in-r/
# Set a seed
set.seed(500)
library(MASS)
data <- Boston
# Check that no data is missing
apply(data,2,function(x) sum(is.na(x)))
# Train-test random splitting for linear model
@neelsoumya
neelsoumya / gar_fun.r
Created September 3, 2021 16:32 — forked from fawda123/gar_fun.r
gar_fun
gar.fun<-function(out.var,mod.in,bar.plot=T,struct=NULL,x.lab=NULL,
y.lab=NULL, wts.only = F){
require(ggplot2)
require(plyr)
# function works with neural networks from neuralnet, nnet, and RSNNS package
# manual input vector of weights also okay
#sanity checks
@neelsoumya
neelsoumya / testing.R
Last active August 5, 2020 07:28
An example to show a testing framework in R using the testthat package
An example to show a testing framework in R using the testthat package