descubrimiento de insights a través de text mining: cómo y para qué analizar grandes cantidades...
TRANSCRIPT
![Page 1: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/1.jpg)
Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes
cantidades de textosAndrea Villanes - @andreagrr
Big Data Analytics Summit 2016
Lima - Perú
![Page 2: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/2.jpg)
Big Data Analytics Summit Perú
Acerca de mi
Educación
Experiencia
Otros
![Page 3: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/3.jpg)
Big Data Analytics Summit Perú
Cada minuto…
300,000 tweets
2.5 millones de posts
200 millones de mensajes
#ProcastinandoAndo
*The Data Explosion in 2014 Minute by Minute – Infographic
![Page 4: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/4.jpg)
Big Data Analytics Summit Perú
Text Mining
“…find interesting regularities in large textual datasets” (Fayad)
…donde interesante significa no-trivial, escondido, desconocido, y potencialmente util.
![Page 5: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/5.jpg)
Big Data Analytics Summit Perú
Proceso de Text Mining
10 0 8 9 0 3 3 0
15 5 6 0 9 11 0 1
0 2 25 12 0 9 10 0
1 11 0 5 5 0 5 21
0 6 12 2 0 2 5 3
19 8 2 13 0 0 10 14
15 12 5 3 8 9 5 0
5 0 11 0 10 0 5 8
Term 1
Term 2
Term 3
Term 4
...
Term n-2
Term n-1
Term n
![Page 6: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/6.jpg)
Big Data Analytics Summit Perú
Transformacion de texto a una matrix
Recoleccion de Datos
Text ParsingTerm Vector Weighting
![Page 7: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/7.jpg)
Big Data Analytics Summit Perú
Recoleccionde Datos
Text ParsingTerm Vector Weighting
Web crawling: recolección de datos de la web
APIs: Twitter, Trip Advisor, Facebook
Archivos CSV: encuestas, emails, respuestas abiertas, etc!
![Page 8: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/8.jpg)
Big Data Analytics Summit Perú
Recoleccionde Datos
Text ParsingTerm Vector Weighting
Limpieza de texto: remover palabras innecesarias y deshacer redundancia
Stop Words: remover palabras comunes pero que no proveen utilidad al descubrimiento del contexto (el, la, de, los, y, etc…)
Abrir
Abrir lo
Abrir ias
Abrir as
AbrirStemming: convierte las palabras a su raíz.
![Page 9: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/9.jpg)
Big Data Analytics Summit Perú
Recoleccionde Datos
Text ParsingTerm Vector Weighting
Term Frequency–Inverse Document Frequency (TF-IDF)
Las palabras individuales tienen un peso dada sufrecuencia en el document (term frequency), y por la frequency en todos los documentos en conjunto(document frequency)
![Page 10: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/10.jpg)
Big Data Analytics Summit Perú
Transformacion de texto a una matrix
Recoleccion de Datos
Text ParsingTerm Vector Weighting
10 0 8 9 0 3 3 0
15 5 6 0 9 11 0 1
0 2 25 12 0 9 10 0
1 11 0 5 5 0 5 21
0 6 12 2 0 2 5 3
19 8 2 13 0 0 10 14
15 12 5 3 8 9 5 0
5 0 11 0 10 0 5 8
![Page 11: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/11.jpg)
Big Data Analytics Summit Perú
Producto final
10 0 8 9 0 3 3 0
15 5 6 0 9 11 0 1
0 2 25 12 0 9 10 0
1 11 0 5 5 0 5 21
0 6 12 2 0 2 5 3
19 8 2 13 0 0 10 14
15 12 5 3 8 9 5 0
5 0 11 0 10 0 5 8
Term 1
Term 2
Term 3
Term 4
...
Term n-2
Term n-1
Term n
Que algoritmos podemosaplicar en esta matrix?
• Clustering (segmentacion)• Clasificacion• Associacion de palabras
![Page 12: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/12.jpg)
Big Data Analytics Summit Perú
Herramientas
• SAS Enterprise Miner (Text Miner)• Text parsing, Term weighting, LSA,
modelos
• Needed <- c("tm", "SnowballCC", "RColorBrewer", "ggplot2", "wordcloud", "biclust", "cluster", "igraph", "fpc")
• Text parsing, term weighting, LSA, LDA, NMF, modelos
• scikit-learn, nltk, numpy, pandas, beautiful soup
• Web crawling, text parsing, termweighting, LSA, LDA, NMF, modelos
![Page 13: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/13.jpg)
Big Data Analytics Summit Perú
Ejemplos de Insightsusando Text Mining
![Page 14: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/14.jpg)
Big Data Analytics Summit Perú
Aplicaciones de Text Mining #1
1. Analizando data de social media: Facebook & Twitter
![Page 15: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/15.jpg)
Big Data Analytics Summit Perú
Analizando data de Facebook - Clustering
549
536
210
160
Family lovers
Night lovers
Vacation lovers
Beach lovers
May 28th
![Page 16: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/16.jpg)
Big Data Analytics Summit Perú
Analizando data de Twitter - Predicción
Dime que es lo que twiteas, y tedire quien eres
![Page 17: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/17.jpg)
Big Data Analytics Summit Perú
Analizando data de Twitter - Predicción
MamaAdolescenteGeek
![Page 18: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/18.jpg)
Big Data Analytics Summit Perú
Analizando data de Twitter - Prediccion
Correctly predicted
86%
Incorrectly predicted
14%
Adolescente
![Page 19: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/19.jpg)
Big Data Analytics Summit Perú
Analizando data de Twitter - Prediccion
Correctly predicted
28%
Incorrectly predicted
72%
Geek
![Page 20: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/20.jpg)
Big Data Analytics Summit Perú
Analizando data de Twitter - Prediccion
Correctly predicted
78%
Incorrectly predicted
22%
Mama
![Page 21: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/21.jpg)
Big Data Analytics Summit Perú
Aplicaciones de Text Mining #2
2. Analizando respuestas abiertas en encuestas sobre quejas en productos de uso diario
![Page 22: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/22.jpg)
Big Data Analytics Summit Perú
Descripción del dataset
• Respuestas abiertas de una encuesta:
“Describe everyday usability problems in any product”
• Numero de observaciones = 384• Promedio de palabras por respuesta = 182
![Page 23: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/23.jpg)
Big Data Analytics Summit Perú
Ejemplos de las respuestas
“A poor design that I have experienced in my everyday life is
the safety lids on fruit cups. The lids on the fruit cups have
this clip on the top that you are supposed to be able to open
with ease. Well when I attempt to open the product either my
fruit spills out of the can from my hard tugging at the pin or I
get cut from the aluminum lid. I really hope parents don't let
their kids open these products by themselves because they
could possible get cut. I believe if the product is to be easy to
open let it be easily accessible to everyone not just grown
ups.”
“A bad design I have encountered is rooms
with light switches on the wall as you walk in
but they do not have a light fixture on the
ceiling. That is like having a door handle on
a wall. no point.”
“ATM machines have snazzy little computer screen printouts
but the problem is that if the sun is shining at your back while
using one the glare makes the screen unreadable. They should
position ATM machines North to South or give you shade.”
“An example of something that drives me crazy are
washers and dryers. I really think they should be
standardized. I get used to the way mine operate, then
when I have to use someone else's washer and dryer, I
have to stand there forever trying to figure out which
button starts the dryer. A good way to solve this would be
to standardize the layout of the controls, so that
manufacturers could still add fancy options, but
consumers would still know which control did what.”
![Page 24: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/24.jpg)
Big Data Analytics Summit Perú
Ejemplos
![Page 25: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/25.jpg)
Big Data Analytics Summit Perú
Analizando data usando Enterprise Miner
![Page 26: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/26.jpg)
Big Data Analytics Summit Perú
Analizando data usando Enterprise Miner
![Page 27: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/27.jpg)
Big Data Analytics Summit Perú
Analizando data usando Enterprise Miner
![Page 28: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/28.jpg)
Big Data Analytics Summit Perú
Aplicaciones de Text Mining #3
3. Detección de dengue a través de periódicos
![Page 29: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/29.jpg)
Big Data Analytics Summit Perú
Analizando texto a traves del tiempo
Known to transmit:• Dengue• Yellow fever• Chikungunya• Zika
Probability of dengue occurrence in 2010
Source: Bhatt, Samir et al. “The Global Distribution and Burden of Dengue.” Nature496.7446 (2013): 504–507. PMC.
![Page 30: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/30.jpg)
Big Data Analytics Summit Perú
Analizando texto a traves del tiempo
0
100
200
300
400
500
600
700
Nu
mb
er o
f A
rtic
les
Month
Number of Articles by Month
Prevention
Reported Cases
Total
Total
Prevention (36%)
![Page 31: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/31.jpg)
Big Data Analytics Summit Perú
Analizando texto a traves del tiempo
0
100
200
300
400
500
600
700
Nu
mb
er o
f A
rtic
les
Month
Number of Articles by Month
Prevention
Reported Cases
Total
Total
Prevention (36%)
Reported Cases (33%)
![Page 32: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/32.jpg)
Big Data Analytics Summit Perú
Analizando texto a traves del tiempo
0
100
200
300
400
500
600
700
Nu
mb
er o
f A
rtic
les
Month
Number of Articles by Month
Politics
Prevention
Reported Cases
Total
Total
Prevention (36%)
Reported Cases (33%)
Politics (11%)
![Page 33: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/33.jpg)
Big Data Analytics Summit Perú
Cómo comenzar con Text Mining?
“Text Mining: Predictive Methods for Analyzing Unstructured Information”Sholom M. Weiss and Nitin Indurkhya
“Web Scraping with Python”Ryan Mitchell
“Natural Language Processing with Python”Bird and Klein
![Page 34: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/34.jpg)
Big Data Analytics Summit Perú
Habilidades para ser un cientifico de datos
Algoritmos Estadística Algebra Lineal
Escrita Oral
Teoría
Herramientas
Visualización
Comunicación
![Page 35: Descubrimiento de Insights a través de Text Mining: cómo y para qué analizar grandes cantidades de textos](https://reader034.vdocuments.site/reader034/viewer/2022042907/5879c5cf1a28abb42a8b61e3/html5/thumbnails/35.jpg)
Big Data Analytics Summit Perú
Gracias!
www.andreavillanes.com
@andreagrr
www.MentorMeInfo.com
https://www.facebook.com/MentorMeInfo