Machine Learning with Apache Spark MuleSoft Academy

Hoy: -

Clasificación binaria: Logistic Regression. Métricas para clasificación binaria: -

-

Feature Engineering -

-

Log loss AUC One Hot Encoding Feature Hashing

Notebook 2: -

Predecir los clicks en avisos

Logistic Regression

Logistic Regression -

Algoritmo para clasificación binaria (puede extenderse a multi-clase) Funciona como una regresión lineal agregando una función de activación: la función logística. Genera predicciones que sirven como probabilidades. En general funciona muy pero muy bien cuando tenemos muchos datos y pocos features.

Función Sigmoidea

Función Costo

Gradiente

Ejemplo

Clasificación Multiclase

Más de 2 Clases -

One vs All -

-

Entrenar un clasificador binario por cada clase.

One vs One -

Entrenar un clasificador binario por cada par de clases.

ROC & AUC

ROC -

False Positives False Negatives True Positives True Negatives

One Hot Encoding

One Hot Encoding -

Convertir cada par (featureId, value) en un número único. Cada columna es binaria y representa con 1 y 0 si ese feature toma dicho valor para la fila en cuestión. Ejemplo: (color=blue, age=15, idiom=en) (color=red,age=20,idiom=en) (color=blue,age=25,idiom=sp) 0: color-blue 1:color-red 2:age-15 3:age-20 4:age-25 5:idiom-en 6:idiom-sp (0,0,0,0,0,0,0), (0,0,0,0,0,0,0),(0,0,0,0,0,0,0)

One Hot Encoding -

Convertir cada par (featureId, value) en un número único. Cada columna es binaria y representa con 1 y 0 si ese feature toma dicho valor para la fila en cuestión. Ejemplo: (color=blue, age=15, idiom=en) (color=red,age=20,idiom=en) (color=blue,age=25,idiom=sp) 0: color-blue 1:color-red 2:age-15 3:age-20 4:age-25 5:idiom-en 6:idiom-sp (1,0,1,0,0,1,0), (0,0,0,0,0,0,0),(0,0,0,0,0,0,0)

One Hot Encoding -

Convertir cada par (featureId, value) en un número único. Cada columna es binaria y representa con 1 y 0 si ese feature toma dicho valor para la fila en cuestión. Ejemplo: (color=blue, age=15, idiom=en) (color=red,age=20,idiom=en) (color=blue,age=25,idiom=sp) 0: color-blue 1:color-red 2:age-15 3:age-20 4:age-25 5:idiom-en 6:idiom-sp (1,0,1,0,0,1,0), (0,1,0,1,0,1,0),(0,0,0,0,0,0,0)

One Hot Encoding -

Convertir cada par (featureId, value) en un número único. Cada columna es binaria y representa con 1 y 0 si ese feature toma dicho valor para la fila en cuestión. Ejemplo: (color=blue, age=15, idiom=en) (color=red,age=20,idiom=en) (color=blue,age=25,idiom=sp) 0: color-blue 1:color-red 2:age-15 3:age-20 4:age-25 5:idiom-en 6:idiom-sp (1,0,1,0,0,1,0), (0,1,0,1,0,1,0),(1,0,0,0,1,0,1)

Feature Hashing

Feature Hashing -

La posición está determinada por el feature y su valor. Podemos elegir cualquier dimensionalidad mediante el rango de la función de hashing. Ej si queremos vectores de 4 elementos -

h(colorblue) = 3 h(colorred) = 2 h(age15)= 1 h(age20)= 1 h(age25)= 0 h(idiomen)= 3 h(idiomsp)= 1

Feature Hashing -

(color=blue, age=15, idiom=en) => (0,1,0,2) (color=red,age=20,idiom=en) => (0,1,1,1) (color=blue,age=25,idiom=sp) => (1,1,0,1)

Feature Hashing Variantes -

Usar una segunda función de hashing para determinar el signo y sumar o restar en la posición. Esto minimiza el efecto de las colisiones.

Feature Hashing -

En general el efecto de las colisiones no solo no es negativo sino que puede ser positivo. Ejemplo: 94% de colisiones y menos de un 2% de cambio en la precisión al clasificar!!!! [source?]

Notebook 2

Click Through Rate by Criteo

Notebook

Next Week

Recomendaciones

04 Logistic Regression.pdf

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. 04 Logistic ...

763KB Sizes 2 Downloads 137 Views

Recommend Documents

Logistic Regression - nicolo' marchi
These scripts set up the dataset for the problems and make calls to functions that you will write. .... 1.2.3 Learning parameters using fminunc. In the previous ...

Global Logistic Properties
Feb 6, 2015 - US$138 mln and the company recognized US$40 mln of development ..... UOB. 14. 15. 16. ARA Asset Management. Challenger Technologies.

t-Logistic Regression
All code is written in Matlab, and for the linear SVM we use the Matlab .... The red (dark) bars (resp. cyan (light) bars) indicate the frequency of ξ assigned to .... Software available at http://www.kyb.mpg.de/bs/people/fabee/universvm. html. 9 ..

Global Logistic Properties Ltd
3PL/wholesale distributors. 4Q14. 9-Jan-14. GLP Park Hefei Hi-Tech. Hefei. China. 18,000. 3PL/wholesale distributors. 4Q14. 9-Jan-14. GLP Park Jiangxia.

[PDF] Applied Logistic Regression
of correlated outcome data A wealth of additional material for topics ranging from Bayesian methods to assessing model fit Rich data sets from real-world studies ...

1720-04-04
Aug 1, 2017 - effective August 12, 1986. (For history prior to August 12, 1986 see pages (iii)-(i).) Amendment filed. March 22, 1990; effective June 26, 1990.

Lesson 7.5 Logistic Function pdf.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Lesson 7.5 ...

predictive modeling using logistic regression sas course notes pdf ...
Page 1 of 1. predictive modeling using logistic regression sas course notes pdf. predictive modeling using logistic regression sas course notes pdf. Open. Extract.

sac - 04-04-2013.pdf
... the Support Center Specialists to address academic and personal concerns,. including how to locate quality child care. 4. Is it possible to get more computers, ...

HIN 04-04-2017.pdf
ye®®es Dehevee hetje-hetje mecee®eej oes lees yeeyee mecePes 3en keÌ3ee mee|Jeme keÀj jns nQ~ yeeyee ye®®eeW keÀes nj neuele. ceW Tb®e heo ...

04-04-17.pdf
Page 1 of 2. By Emma Scott,. Emelia Skogstad. and Grace Isaacson. An ad-room was held to. begin the day today as students. and staff prepare for standard- ized testing of juniors to begin. Wednesday. On Wednesday, juniors. will take the S.D. Science

2009-04-04 3. Mitgliederversammlung.pdf
The Old Apostolic Church (Germany). Protokoll der 3. ... Andrea Schulz, Stephan Schulz,. Ruth Schulz, Ingolf ... Mitgliederversammlung.pdf. 2009-04-04 3.

04-04-16.pdf
ve. Whoops! There was a problem loading this page. Retrying... Whoops! There was a problem loading this page. Retrying... 04-04-16.pdf. 04-04-16.pdf. Open.

DF-04-04.pdf
Nombre: Ana María Sanabria Nombre: Héctor Cadavid Ramírez. RECTORÍA. Oficina de Planeación y Desarrollo Institucional. Área de Calidad y Mejoramiento.