Slide 1

Slide 1 text

T E X T M I N I N G EXPLORATORY DATA ANALYSIS TO MACHINE LEARNING

Slide 2

Slide 2 text

HELLO T I D Y T E X T Data Scientist at Stack Overflow @juliasilge https://juliasilge.com/ I’m Julia Silge

Slide 3

Slide 3 text

T I D Y T E X T TEXT DATA IS INCREASINGLY IMPORTANT 

Slide 4

Slide 4 text

T I D Y T E X T TEXT DATA IS INCREASINGLY IMPORTANT  NLP TRAINING IS SCARCE ON THE GROUND 

Slide 5

Slide 5 text

TIDY DATA PRINCIPLES + COUNT-BASED METHODS = T I D Y T E X T

Slide 6

Slide 6 text

https://github.com/juliasilge/tidytext

Slide 7

Slide 7 text

https://github.com/juliasilge/tidytext

Slide 8

Slide 8 text

http://tidytextmining.com/

Slide 9

Slide 9 text

T I D Y T E X T EXPLORATORY DATA ANALYSIS  N-GRAMS AND MORE WORDS MACHINE LEARNING  

Slide 10

Slide 10 text

EXPLORATORY DATA ANALYSIS T I D Y T E X T

Slide 11

Slide 11 text

from the Washington Post’s Wonkblog

Slide 12

Slide 12 text

from the Washington Post’s Wonkblog

Slide 13

Slide 13 text

D3 visualization on Glitch

Slide 14

Slide 14 text

WHAT IS A DOCUMENT ABOUT? T I D Y T E X T TERM FREQUENCY INVERSE DOCUMENT FREQUENCY

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

• As part of the NASA Datanauts program, I worked on a project to understand NASA datasets • Metadata includes title, description, keywords, etc

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

T A K I N G T I D Y T E X T T O T H E N E X T L E V E L N-GRAMS, NETWORKS, & NEGATION

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

T A K I N G T I D Y T E X T T O T H E N E X T L E V E L TOPIC MODELING

Slide 26

Slide 26 text

TOPIC MODELING T I D Y T E X T •Each DOCUMENT = mixture of topics •Each TOPIC = mixture of words

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

T A K I N G T I D Y T E X T T O T H E N E X T L E V E L TEXT CLASSIFICATION

Slide 32

Slide 32 text

TRAIN A GLMNET MODEL T I D Y T E X T

Slide 33

Slide 33 text

TEXT CLASSIFICATION T I D Y T E X T > library(glmnet) > library(doMC) > registerDoMC(cores = 8) > > is_jane <- books_joined$title == "Pride and Prejudice" > > model <- cv.glmnet(sparse_words, is_jane, family = "binomial", + parallel = TRUE, keep = TRUE)

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Slide 37

Slide 37 text

THANK YOU T I D Y T E X T @juliasilge https://juliasilge.com JULIA SILGE

Slide 38

Slide 38 text

THANK YOU T I D Y T E X T @juliasilge https://juliasilge.com Author portraits from Wikimedia Photos by Glen Noble and Kimberly Farmer on Unsplash JULIA SILGE