otto challenge report
TRANSCRIPT
![Page 1: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/1.jpg)
2015
![Page 2: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/2.jpg)
Otto Group: compañía de comercio electrónico.
Problema: mismos productos, clasificados de distinta forma.
Más de 200,000 productos:
Training: 61.878
Test: 144.368
93 características.
9 clases desbalanceadas.
INTRODUCCIÓN
![Page 3: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/3.jpg)
t-SNE 2D
![Page 4: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/4.jpg)
Características
Característica 2: 42 valores.
Característica 3: 37 valores.
Característica 4: 48 valores.
Característica 5: 59 valores.
Característica 6: 15 valores.
Característica 7: 9 valores.
![Page 5: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/5.jpg)
Selección de características65 características
![Page 6: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/6.jpg)
Métrica
Error máximo al fallar: -34.53
Error al acertar con probabilidad 0.9: -0.1053
𝑙𝑜𝑔𝑙𝑜𝑠𝑠=− 1𝑁∑𝑖
𝑁
∑𝑗
𝑀
𝑦 𝑖𝑗 log (𝑝𝑖𝑗)
max ¿ ¿
![Page 7: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/7.jpg)
Transformación
scale log
scale-log
𝑡𝑓 (𝑡 ,𝑑)×𝑖𝑑𝑓𝑡 (𝑡 ,𝐷)
tf-idf
2√𝑥+3 /8
scale
𝑧=𝑥−𝜇 𝜎 log (𝑥+1)
𝑠𝑐𝑎𝑙𝑒( log (𝑥+1 )+1)
![Page 8: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/8.jpg)
Transformaciones
![Page 9: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/9.jpg)
Transformaciones
![Page 10: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/10.jpg)
FiltradoIterative-Partitioning Filter.
Tres grupos de clasificadores:
LMT (Rweka).
J48 (Rweka).
Bagging (adabag).
5 clasificadores, mayoría en 3: ninguna instancia eliminada.
11 clasificadores, mayoría en 6: 4 instancias eliminadas.
Transformación scale(log(x+1)+1): sobre 600 instancias eliminadas.
![Page 11: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/11.jpg)
Random Forest
Benchmark organización (Python árboles): 1.5387
1,000 árboles, log(x+1)
5 folds-CV:
0.8 training, 0.2 test
Mean.Accuracy Sd
Class_1 0.3983019 0.010407332
Class_2 0.8836811 0.005305709
Class_3 0.4259428 0.010478153
Class_4 0.3400000 0.008294590
Class_5 0.9559097 0.002991734
Class_6 0.9369179 0.001994033
Class_7 0.6189622 0.006890707
Class_8 0.9174651 0.005205630
Class_9 0.8663486 0.007391558
![Page 12: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/12.jpg)
Random Forest (1000 árboles)
Error: 0.6880±0.0023
Precisión: 0.7922±0.0014
Kaggle (SMOTE y scale-log): 0.549699
![Page 13: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/13.jpg)
SVM (polinomial)
Error: 0.591±0.009
Precisión: 0.7807±0.0020
Kaggle (scale-log): 0.56428
![Page 14: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/14.jpg)
XGBOOSTING
Error: 0.476±0.009
Precisión: 0.7807±0.0020
Kaggle (anscombe): 0.43055
![Page 15: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/15.jpg)
BALANCEO MULTICLASE
Random Undersampling.
Random Oversampling.
SMOTE.
Tomek Link.
![Page 16: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/16.jpg)
BALANCEOS
![Page 17: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/17.jpg)
BALANCEOS
![Page 18: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/18.jpg)
PROBABILIDADES
XGBOOSTING Random Forest
![Page 19: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/19.jpg)
NNET:
Perceptrón 0.9
RSNNS:
Jordan 1.4
Perceptrón multicapa 0.62 Iteracciones máximas: 250 Tamaño: 28 Parámetro de aprendizaje: 0.1 Función de aprendizaje: Rprop. Transformación: scale-log.
REDES NEURONALES
![Page 20: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/20.jpg)
REDES NEURONALES (Deep learning)
H2O
![Page 21: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/21.jpg)
H2O Transformación: anscombe. 3 capas: 1,200, 600, 300 Hidden dropout ratio: (0.5, 0.5, 0.5). Input dropuot ratio: 0.05 Epoch: 120 I1=1e-5 I1=1e-5 rho=0.99 epsilon=1e-8 Ejemplos de entrenamiento por iteración: 2,400
0.453Selección de características y balanceo: 0.4437
REDES NEURONALES (Deep learning)
![Page 22: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/22.jpg)
REDES NEURONALES (Deep learning)
Ensemble
![Page 23: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/23.jpg)
LASAGNE (Python) Transformación: anscombe. 3 capas ocultas: 520, 460, 160 Coeficiente de aprendizaje 0.001 Actualización mediante adagrad. 0.461
THEANO (Python) Densa-dropout-densa: 1,000, 500, 1,000 Coeficientes 0.25 y 0.18 Resto de parámetros iguales a LASAGNE. 0.445
REDES NEURONALES (Convolutivas)
![Page 24: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/24.jpg)
REDES NEURONALES
![Page 25: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/25.jpg)
PROBABILIDADES COCINADAS
Clase ganadora 0.9Segunda clase 0.1
Umbral 0.7Clase ganadora 0.8Segunda clase 0.1Tercera clase 0.1
1 2 3 4 5 6 7 8 9
81.45 13.25 3.54 0.93 0.42 0.14 0.12 0.09 0.02
![Page 26: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/26.jpg)
DYNAMIC ONE vs. ONE
Random Forest.
27 vecinos.
Sólo se obtiene clase ganadora.
Kaggle 0.7170, CV 0.6452
Reparto de probabilidades según número de vecinos.
Orden 1 2 >2
1 0.999 0.995 0.815
2 0.0003 0.001 0.132
3 0.0002 0.0005 0.036
4 0.0001 0.0001 0.0093
5 0.0001 0.0001 0.0042
6 0.0001 0.0001 0.0014
7 0.0001 0.0001 0.0012
8 0.00005 0.00005 0.00085
9 0.00005 0.00005 0.00005
![Page 27: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/27.jpg)
DYNAMIC ONE vs. ONE y ENSEMBLE
Suma de las probabilidades de la matriz votación para cada clase.
Orden de las clases.
Distancia de los vecinos más cercanos y clase.
Dos estrategias.
Particionado 0.8/0.2
Generamos un OVO y un ensemble.
![Page 28: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/28.jpg)
ESTRATEGIA 1
12371 instancias sobre las que generar reglas vs. 144368 instancias conjunto test.
Son reglas adhoc: no hay forma de garantizar que se cumplan en todo el conjunto test.
OVO y ensemble coincidían 86.7 por ciento en primera clase.
Hay clases que tienen mucho ruido.
![Page 29: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/29.jpg)
ESTRATEGIA 1
![Page 30: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/30.jpg)
ESTRATEGIA 1Condiciones
Que la probabilidad de la instancia que se obtenía a partir de la matriz de votación estuviera por encima de un cierto valor.
Que los vecinos que la rodearan sólo tuvieran un número determinado de clases distintas.
Que la condición anterior se pudiera acotar a un número distinto de vecinos.
Que además de las dos anteriores, esos vecinos no estuvieran lejos de la instancia (entendido como tal que su distancia sea menor que la distancia media de todos los vecinos más la desviación típica).
Modificaba 1128 instancias del conjunto de prueba: de 0.4965 a 0.4942 en CV.
Modificaba 12070 del conjunto test: de 0.41354 a 0.44580 en Kaggle.
![Page 31: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/31.jpg)
SOLUCIÓN GANADORALa solución fue implementada por
Gilberto Titericz
Stanislav Semenov
![Page 32: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/32.jpg)
SOLUCIÓN GANADORA
La solución propuesta está basada en 3 capas de aprendizaje, las cuales funcionan de la siguiente forma:
Nivel 1: se realizaron 33 modelos para realizar predicciones, que se utilizaron como nuevas características para el nivel 2. Estos modelos se entrenaban con una 5 fold cross-validation.
Nivel 2: en este nivel se utilizan las 33 nuevas características obtenidas en el nivel 1 más 7 meta características utilizando: XGBOOST, Neural Network (NN) y ADABOOST con ExtraTrees (árboles más aleatorios).
Nivel 3: en este nivel se realizaba un ensamble de las predicciones de la capa anterior.
![Page 33: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/33.jpg)
SOLUCIÓN GANADORAEn la imagen podemos apreciar la arquitectura completa de la solución. Los modelos utilizados en la primera capa son (con diferentes selección de características y transformaciones):
NN (Lasagne Python). XGBOOST. KNN. Random Forest. H2O (deep learning, GMB). Sofia. Logistic Regression. Extra Trees Classifier.
![Page 34: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/34.jpg)
SOLUCIÓN GANADORAMeta-características generadas para esta primera capa:
Característica 1: distancia a los vecinos más cercanos de la clase. Característica 2: suma de las distancias a los 2 vecinos más cercanos de cada clase. Característica 3: suma de las distancias a los 4 vecinos más cercanos de cada clase. Característica 4: distancia a los vecinos más cercanos de cada clase con espacio TFIDF. Característica 5: distancia al vecino más cercano de cada clase utilizando la reducción de características T-SNE a 3 dimensiones. Característica 6: clustering del dataset original. Característica 7: número de elementos diferentes a cero de cada fila.
![Page 35: Otto Challenge report](https://reader033.vdocuments.us/reader033/viewer/2022052915/58f11d011a28abf8198b45c9/html5/thumbnails/35.jpg)
SOLUCIÓN GANADORAEl resultado de esta solución fue:
Cross-validated solution scored LB (Public) LB (Private)
0.3962 0.38055 0.38243