Transmogrification: The Magic
- f Feature Engineering
Transmogrification: The Magic of Feature Engineering Leah McGuire - - PowerPoint PPT Presentation
Transmogrification: The Magic of Feature Engineering Leah McGuire and Mayukh Bhaowal ML algorithms take center stage in AI Modeling Raw Data Feature Engineering Bottleneck Mythical Numeric Matrix X 1 X 2 X 3 X 4 X 5 Y 0 1 0 0 0 A 1
Modeling
Feature Engineering
Bottleneck
Raw Data
Imputation Track null value Log transformation for large range Scaling - zNormalize Smart Binning
Imputation
Track null value One Hot Encoding Dynamic Top K pivot Smart Binning LabelCount Encoding Category Embedding
Numeric Categorical Spatial Temporal
Tokenization Hash Encoding Tf-Idf Word2Vec Sentiment Analysis Language Detection Time difference Circular Statistics Time extraction (day, week, month, year) Closeness to major events Augment with external data e.g avg income Spatial fraudulent behavior e.g: impossible travel speed Geo-encoding
Text
Zipcode Subject Phone Email Age Age [0-15] Age [15-35] Age [>35] Email Is Spammy Top 10 Email Domain Country Code Phone Is Valid Top TF-IDF Terms Average Income Vector
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
— Data Scientist
— Legal Counsel
— Non Technical End User
P1(c | f) Pk(c | f) Pn(c | f)
Σ
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
F1
Machine Human Right Wrong
https://www.propublica.org/article/how-we-analyzed-the-compas-recidivism-algorithm
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
Can you use a simple model? Are the raw features fed into the model interpretable? Does the consumer care about how features affect the model or just feature insights? Does the consumer care about individual predictions? Feature Weights/ Importance Global Feature Impact Model Agnostic Global Secondary Model Global Feature Weights/ Importance Local Feature Impact Model Agnostic Local Secondary Model Local
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
X1 X2 X3 X4 X5 Y 1 A 1 1 1 B 1 1 B 1 1 1 1 1 A 1 1 A
Zipcode Subject Phone Email Age Age [0-15] Age [15-35] Age [>35] Email Is Spammy Top 10 Email Domain Country Code Phone Is Valid Top TF-IDF Terms Average Income Vector
https://ontotext.com/knowledgehub/fundamentals/metadata-fundamental/
feature the column was made from
feature(s) the column was made from
get the column
information across columns
in the column
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
Can you use a simple model? Are the raw features fed into the model interpretable? Does the consumer care about how features affect the model or just feature insights? Does the consumer care about individual predictions? Feature Weights/ Importance Global Feature Impact Model Agnostic Global Secondary Model Global
P1(c | f) Pk(c | f) Pn(c | f)
Σ
X X2 X3 X4 X5 Y 1 A 1 1 1 B 1 1 B 1 1 1 1 1 A 1 1 A
http://resources.esri.com/help/9.3/arcgisengine/java/gp_toolref/spatial_statistics_toolbox/multicollinearity.htm
https://www.statmethods.net/advgraphs/images/corrgram1.png
how you got the feature
importance
{
"featureName" : "sex", "derivedFeatures" : [ { "stagesApplied" : [ "pivotText_OpSetVectorizer" ], "derivedFeatureValue" : "Male", "corr" : -0.5185045877245239, "mutualInformation" : 0.19652543270839468, "contribution" : 0.1763534388489181, …. }, { "stagesApplied" : [ "pivotText_OpSetVectorizer" ], "derivedFeatureValue" : "Female", "corr" : 0.518504587724524, "mutualInformation" : 0.19652543270839468, "contribution" : 0.18080355705344647, …. } }
What does it mean to explain your model? Why explain your model? How to explain your model? Complications
engineering Global (full model) solutions Local (record level) solutions Interpretability vs accuracy tradeoff
Can you use a simple model? Are the raw features fed into the model interpretable? Does the consumer care about how features affect the model or just feature insights? Does the consumer care about individual predictions? Feature Weights/ Importance Local Feature Impact Model Agnostic Local Secondary Model Local
852 2 1 36
https://www.oreilly.com/ideas/ideas-on-interpreting-machine-learning
{"age":17.0, "embarked":"C", "name":"Attalah, Miss. Malake", "pClass":"3", "parch":"0", "sex":"female", "sibSp":"0", "survived":0.0, "ticket":"2627"} Score = 0.62 Why? sex = "female" (+0.13), pClass = 3 (-0.05), ...
https://www.oreilly.com/ideas/ideas-on-interpreting-machine-learning
https://www.oreilly.com/ideas/ideas-on-interpreting-machine-learning