This work is about classifying reasons of insurance cancellation, from the text written by insurance brokers. To achieve this goal, it was used data provided by the brokers that works with the same software, segElevia.
The task definition of this project was obtained during the process of business understanding and analysing the data obtained. Then it was discovered that the brokers make mistakes when selecting the label for the cancellation reason, when comparing it to the content of the free text field.
In the process of development of this project, the following software was used: Jupyter Notebook as working environment, Python as development language, and Scikit Learning, Pandas, Seaborn, Spacy and Numpy as libraries.
In regards to the data processing it were used different techniques, such as: word elimination, lemmatization, tokenization, vectorization, zero padding and oversampling; however the last one was not implemented, given that the results were unsatisfactory.
During the development of this end of degree project, a variety of artificial intelligence, such as the Random Forest Classifier or the Perceptron.
After analysing the results obtained on every model, it was considered that the model that provided more satisfactory, was the Random Forest Classifier. This model provides a weighted average in the metrics of 75% on precision, 74% on recall and 74% on f1-score.
Finally, from the obtained results, could be created a predictor that helps brokers by indicating the name of the label that they should put while they are writing the free text field, thus reducing the times that the brokers classify wrongly the reason why cancellation of the insurance was made.
Falla de san andres y el gran cañon : enfoque integral
Ivan Luque (2023) Minería de texto mediante NLP en el sector seguros.pdf
1. Minería de texto
mediante NLP en
el sector seguros
Ivan Luque Garcia
3 de julio de 2023
Grado en Ingeniería Telemática
Director: Alberto Burgos Plaza
Tutor: Javier Mora Serrano
2. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 2
Índice
01 Motivación Tecnología NLP
04
Problema a resolver
02
Objetivos
03
Propuesta
05
Conclusiones
06
3. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 3
Análisis de
sentimientos de tweets
1- Motivación
Caja negra
Código proporcionado
Encontrar TFG
Proyecto en antiguo trabajo
4. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 4
2- Problema a Resolver
5. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 5
3- Objetivos
Clasificar las
etiquetas erróneas
04
Crear un algoritmo
que use NLP
02
Incidencias
clasificadas
inadecuadamente
01
Entender el
funcionamiento del
NLP
03
Datos en mejor
estado para usar en
sus modelos
6. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 6
4- Tecnología NLP
Procesado de Lenguaje Natural
Tratamiento de datos escritos por personas
7. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 7
4- Tecnología NLP
Bard
Estado del arte
01
Aplicaciones
02
Transformers
Bert
GPT-4
ChatGPT
8. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 8
5- Propuesta - CRISP-DM
9. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 9
5- Propuesta - Datos
MAP_Id MAP_Descripcion
1 Falta de pago. Reclamación.
2 Error en la emisión
3 Falta de pago. Insolvencia.
4 Falta de formalización
5 Reemplazo
6 Traspaso
7 Cese o venta del riesgo
8 Anulación asegurado por carta
MAP_Id MAP_Descripcion
9 Ilocalizable tomador
10 Fin riesgo. Temporal.
11 Siniestralidad
12 Desaparición del riesgo
13 Convenio anulación
99 Otros
100 AUXILIAR INDICA BAJA
101 Cambio de agente
10. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 10
5- Propuesta - Datos
POL_MotivoAnulación POL_DescripciónMotivo
5.0 pol
6.0 impago no renueva por precio
5.0 reemplazo
7.0 ninguno solicitud asegurado otras causas
6.0 camibo a allianz
99.0 ha vendido el coche
7 Cese o venta del riesgo
11. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 11
5- Propuesta - Preprocesado:Eliminación de palabras
01
ha vendido el coche
02
siniestro del cochee
03
ha cambiado de compañía
Frase inicial
ha vendido coche
siniestro cochee
ha cambiado compañia
Primer preprocesado
12. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 12
5- Propuesta - Preprocesado:Lematización
01
ha vendido coche
02
siniestro cochee
03
ha cambiado compañia
Primer preprocesado
haber vender coche
siniestro coche
haber cambiar compañia
Segundo preprocesado
13. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 13
5- Propuesta - Preprocesado:Tokenización
01
haber vender coche
02
siniestro coche
03
haber cambiar compañia
Segundo preprocesado
haber -> 10, vender -> 75,
coche -> 234
siniestro -> 176,
coche -> 234
haber -> 10, cambiar -> 372,
compañia -> 1700
Tercer preprocesado
14. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 14
5- Propuesta - Preprocesado:Vectorización
01
haber -> 10, vender -> 75,
coche -> 234
02
siniestro -> 176,
coche -> 234
03
haber -> 10, cambiar -> 372,
compañia -> 1700
Tercer preprocesado
(10, 75, 234)
(176, 234)
(10, 372, 1700)
Cuarto preprocesado
15. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 15
5- Propuesta - Preprocesado:Padding
01
(10, 75, 234)
02
(176, 234)
03
(10, 372, 1700)
Cuarto preprocesado
(10, 75, 234, 0, 0, 0)
(176, 234, 0, 0, 0, 0)
(10, 372, 1700, 0, 0, 0)
Último preprocesado
16. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 16
5- Propuesta - Modelos
Modelos
Perceptron y MLP Resultados pobres
Gradient Boosting
Resultados positivos, pero requieren
mucho tiempo
Random Forest Classifier Resultados favorables
Regression lineal Modelo espera datos de tipo continuo
K-means
Todos los clusters tenían como
categoría principal la misma
17. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 17
5- Propuesta - Random Forest Classifier
18. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 18
5- Propuesta - Métricas
7- Cese o venta
del riesgo
True False
Positive
ha vendido el
coche -> 7
camibo a
allianz ->7
Negative
camibo a
allianz -> 6
ha vendido el
coche ->99
TP / (TP + FN)
Recall
TP / (TP + FP)
Precision
2TP / (2TP +
FP + FN)
F1-score
20. 03/07/2023 Ivan Luque Garcia Minería de texto mediante NLP en el sector seguros 20
6- Conclusiones
04
Clasificar etiquetas
02
Realización de TFG
01
Código Tweets
03
Resultados
Entender NLP
Crear algoritmo
Mejorar estado
de los datos
Créditos: Esta plantilla de presentación fue creada por Slidesgo