Skip to content

Instantly share code, notes, and snippets.

@yong93
yong93 / logistic_regression.R
Created June 23, 2016 06: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
@yong93
yong93 / gist:5cd2e6fc45f88ab67d09d0629d8c8d3a
Created June 29, 2018 03:27 — forked from davecoutts/gist:b33a4d9447e470c0af46
Install Greenplum 4.3.2.0 on Centos 6.5 and run in two segment single node mode
su - root
# gpinitsystem fails to change the postgresql.conf port setting without ed
yum install ed unzip -y
groupadd -g 8000 gpadmin
useradd -m -s /bin/bash -d /home/gpadmin -g gpadmin -u 8000 gpadmin
passwd gpadmin
mkdir -p /data/master