R and Data Analysis with Neural Network

This is a cheatsheet on using R to do data analysis. The main focus is on Neural Network.

 


#stargazer(traindt, type = "text", title="Descriptive statistics", digits=1, out="table1.txt")
#write(summary(traindt), file="bnp-data-summary.txt")
sink(file="bnp-summary-stats.txt")
print(str(bnpnet))
print(summary(bnpnet))
print(str(bnpnet))
print(summary(traindt))
print(str(testdt))
print(summary(testdt))

sink()

#simp1

#nnet
# bnpnet #bnpnet #bnpred #traindt #testdt #source('/Users/jarina/Downloads/bnp-sim/write-summary-stats.R')

bnpred <- predict(bnpnet, testdt[,c(-1,-23,-52)])

bnpnet <- nnet(traindt$target ~ ., data=traindt[,c(-1,-2,-24,-58)], size=3, MaxNWts=10000000)


testdt <- read.csv('/Users/shirish/Downloads/bnp-sim/train.csv', header = TRUE, sep = ',', fill = FALSE, colClasses = rep(’character’,135))

#removing v22, v56 and v71


 

References

 

R programming example

Missing data

Data stuff

Network Analysis

R and NNET Reference:

xgboot libraries

R Libraries:

  • library(xgboost)
  • library(readr)
  • library(stringr)
  • library(caret)
  • library(car)
  • library(nnet)
  • library(stats4)