Skip to content

Instantly share code, notes, and snippets.

View sidd607's full-sized avatar
🧑‍💻

Siddartha Sekhar Padhi sidd607

🧑‍💻
View GitHub Profile
@sidd607
sidd607 / logistic_regression.R
Created March 29, 2016 17:23 — forked from mick001/logistic_regression.R
Logistic regression tutorial code. Full article available at http://datascienceplus.com/perform-logistic-regression-in-r/
# Load the raw training data and replace missing values with NA
training.data.raw <- read.csv('train.csv',header=T,na.strings=c(""))
# Output the number of missing values for each column
sapply(training.data.raw,function(x) sum(is.na(x)))
# Quick check for how many different values for each feature
sapply(training.data.raw, function(x) length(unique(x)))
# A visual way to check for missing data