Skip to content

Instantly share code, notes, and snippets.

@jonathanlxy
Created September 5, 2016 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanlxy/de37af780deb6217e50f85ce62d983e9 to your computer and use it in GitHub Desktop.
Save jonathanlxy/de37af780deb6217e50f85ce62d983e9 to your computer and use it in GitHub Desktop.
library(data.table)
library(dplyr)
library(dtplyr)
# Load data
events <- fread( '../training.csv' )
x <- events %>% select( -c( EventId, Weight ) )
y <- as.numeric( as.factor( events$Label ) ) - 1
log_mod <- glm( Label ~ .,
data = cbind(
events %>% select( -c( EventId, Weight, Label ) ),
Label = y
),
family = 'binomial' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment