SlideShare a Scribd company logo
1 of 1
Download to read offline
Business
Images	+	
Captions
xDTzv6a
Test	Data
Business Labels
xDTzv6a {1,3,5}
Determine	
Businesses	Labels
Predict	one	Label	
per	Picture
Business
Images	+	
Captions Labels
{1,3,5}Rdoi23s
{2}Ox4geZ
Multi	Label	
businesses
Single	Label	
Businesses
Supervised	Learning	on		Data	
from	Single	Label	Businesses
Predict	one	Label	
per	Picture
Images	+	
Captions Labels
{2}
{2}
{2}
Images	+	
Captions Labels
{1}
{3}
{3}
{5}
{2}
{2}
{2}
Train	Data
Supervised	Learning	on
Data	from	all	Businesses
Caption	Classification
model
Image	Classification
CNN	model
Predictions
Supervised	 ProblemSemi-supervised	 Problem Labelling
Caption	Classification
model
Merge Predictions	
(Average	Probabilities)
CHOCOLATE	FOUNTAIN!
Christina	Bogdan Vincent	Chabot Urjit Patel
Overview
Our goal throughout this project was to predict high level attributes related to venues based on pictures uploaded
by customers on the Yelp platform. Typically, we were interested in predicting whether a restaurant would be
‘good for dinner’, ‘good for groups’ and/or ‘good for kids’. Each business could potentially have several true labels.
There were mainly two major points of interest we had to deal with to solve this question :
1) Inferring very general attributes from images/caption analysis (rather than the most usual case of simply
classifying the images based on the objects represented)
2) The labels to predict were only business level labels. From the fact that a business could have several true
labels, we would not have direct access to individual image level labels, making the task semi-supervised.
To solve this, we first isolated the images from businesses that had only one true label. We trained both an image
based model and a caption based model in order predict individual labels on the remaining images associated
with multi labels businesses. This would turn our initial problem into a supervised model, that we would solve by
training another two image and caption based models. From the single image level predictions, we could
eventually predict the business level multiple attributes.
By	only	using		
images	that	are	
associated	to	single	
label	businesses,	we	
can	perform	fully	
supervised	
classification.	We	
use	the	captions	on	
these	images	to	
train	a	model	using	
tf-idf.	
We	then	use	this	
model	to	determine	
a	unique	picture-
level	label	for	the	
pictures	associated	
to	businesses	with	
multi	labels
Image	individual	label	retrieving	
via	captions	of	images	with	unique	label
Good	for	Kids Good	for	Groups Good	for	Dinner
MultinomialNBClassifier
Train	Accuracy
Test	Accuracy
0.8943
0.6662	
Final	Results
Accross various classifiers,	Linear SVC,	SGD	and	Multinomial	models gave	the	best	
accuracy.
From the	analysis of	the	words contributing the	most to	each class	(bar	chart	above),		we add additional stop	words such as:	
'page',	'restaurant',	'area',	'place',	'interior',	'outside',	'like',	'sauce',	'view'
Data	Understanding
Our	initial	data	consisted	of	two	files.	The	first	mapped	
each	business	to	the	various	attributes	we	had	to	
predict	(possibly	multiple	true	labels	per	business)	:
In	the	second	data	set,	each	row	consisted	of	a	picture	
id	with	its	caption	if	any	and	the	business	it	was	related	
to:
We	can	observe	below	that	our	classes	were	not	evenly	
distributed.	More	particularly,	we	had	very	few	’good	for	
dinner’	businesses.	Furthermore,	displaying	the	
correlation	between	the	target	labels	shows	that	
businesses	that	are	good	for	kids	and	those	that	are	
good	for	groups	are	relatively	negatively	correlated,	as	
we	could	expect	(as	we	show	in	the	caption	analysis	
part,	good	for	group	business	are	more	related	to	key	
words	as	’beer’,	’bar’,	‘night’,	…)	:
Business	multi	labels	prediction
&	Final	results
Finally,	we	predicted	the	business	labels	based	on	the	predicted	labels	of	the	
images	associated	to	each	business	:	if	a	business	had	at	least	one	image	
with	a	given	label,	we	would	predict	that	label	for	the	business	as	well.
We	expose	below	our	final	results	:
Images	individual	labels	predictions
From	the	merge	predictions	of	both	caption	based	and	image	based	models	
(by	simply	averaging	probability	predictions),	we	predicted	individual	labels	
for	each	image	of	the	test	set	by	taking	the	label	corresponding	to	the	
maximum	predicted	merged	probability.
Conclusion	
&	Future	Work
Ultimately,	we	were	able	to	improve	on	our	random	
baseline	with	our	joint	CNN	and	caption-based	
model.	If	we	had	more	time,	we	would	have	used	
another	decision	function	to	infer	business	labels	
from	our	prediction	photo	labels,	instead	of	just	
taking	the	union	of	predicted	labels	across	all	photos.	
We	would	have	also	explored	other	methods	to	
combine	our	predictions	from	our	image	and	caption	
based	models.	Finally,	we	would	have	included	our	
implementation	of	∝SVM,	which	we	believe	would	
have	helped	us	in	our	attempts	to	generate	image-
level	labels.
Images	classification	via	both	caption	and	image	analysis
Input:	
3@96x96
64@24x24 128@8x8
256@8x8 256@4x4 256@4x4 256@4x4 256@2x2
256x2x2
256
3
Convolution
+	Normalization
+	ReLU
+	MaxPooling (4x4)
Convolution
+	Normalization
+	ReLU
+	MaxPooling (3x3)
Convolution
+	Normalization
+	ReLU
Convolution
+	Normalization
+	ReLU
+	MaxPooling (2x2)
Convolution
+	Normalization
+	ReLU
Convolution
+	Normalization
+	ReLU
Convolution
+	Normalization
+	ReLU
+	MaxPooling (2x2)
Full		Connection
Linear	Transforrmation
+	DropOut
Normalization
+	ReLU
+	Dropout
+	Linear	Transforrmation
Data	Augmentation
on	Good	for	Dinner	class	
to	generate	more	data
Data	
Augmentation
on	Input
CNNClassifier
Train	Accuracy 0. 6711
0. 6021Test	Accuracy
Final	Results (after 92	epochs)Data	Augmentation
Original
Normalized
Input	Images
Augmented
Normalized
Input	Images
Once	recovered	what	we	feel	confident	in	being	images	unique	labels,	we	trained	2	fully	supervised	models	separately	:	
1) A	text	classifier	on	the	images	captions,	using	the	exact	same	methodology	as	before
2) A	Convolutional	Neural	Network	on	the	images,	which	architecture	and	results	are	exposed	in	this	section
Visualization	of		the	128	feature	maps	of	the	second	layer
Training	&	validation	mean class	accuracy f(epochs)	
0.9318Precision
Recall 0.5405
0.6841F1	score
Could	you	tell	us,	by	looking	at	this	picture,	if	this	
restaurant	looks	rather	good	for	kids?	Would	you	
rather	recommend	it	as	takeaway	or	for	dinner?	This	
is	typically	the	kind	of	high	level,	context	information	
customers	would	like	to	know	before	choosing	the	
next	restaurant	to	go	to.	The	kind	of	questions	you	
could	ask	a	friend	that	you	know	already	went	to	this	
place	for	example.	But	what	if	your	favorite	
recommendation	platform	/	research	engine	/	social	
network	could	answer	all	your	questions?	Of	course,	
it	is	not	easy	to	find	data	that	carry	such	high	level	
information.	But	both	the	large	amount	of	pictures	
uploaded	by	customers	and	possibilities	offered	by	
machine	learning	and	deep	learning	techniques	
makes	it	interesting	to	try	to	answer	such	questions.
Business	Case

More Related Content

Similar to PosterML

Supercharging your Organic CTR
Supercharging your Organic CTRSupercharging your Organic CTR
Supercharging your Organic CTRPhil Pearce
 
Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18Hull
 
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...Connected Data World
 
There’s data everywhere! - Simo Ahava
There’s data everywhere! - Simo AhavaThere’s data everywhere! - Simo Ahava
There’s data everywhere! - Simo AhavaWeb à Québec
 
B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...
B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...
B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...B2B Marketing Forum
 
Xomia_20220602.pptx
Xomia_20220602.pptxXomia_20220602.pptx
Xomia_20220602.pptxLonghow Lam
 
7 Dimensions of Agile Analytics by Ken Collier
7 Dimensions of Agile Analytics by Ken Collier 7 Dimensions of Agile Analytics by Ken Collier
7 Dimensions of Agile Analytics by Ken Collier Thoughtworks
 
danmcclary-pspresentation-katieboyle-171030115522.pdf
danmcclary-pspresentation-katieboyle-171030115522.pdfdanmcclary-pspresentation-katieboyle-171030115522.pdf
danmcclary-pspresentation-katieboyle-171030115522.pdfssuser3ee399
 
Why Big and Small Data Is Important by Google's Product Manager
Why Big and Small Data Is Important by Google's Product ManagerWhy Big and Small Data Is Important by Google's Product Manager
Why Big and Small Data Is Important by Google's Product ManagerProduct School
 
Data Analytics Practice at Paxcel
Data Analytics Practice at PaxcelData Analytics Practice at Paxcel
Data Analytics Practice at PaxcelPushpinder Singh
 
New seven management tools
New seven management toolsNew seven management tools
New seven management toolsJavith Saleem
 
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Leveraging Lucene/Solr as a Knowledge Graph and Intent EngineLeveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Leveraging Lucene/Solr as a Knowledge Graph and Intent EngineTrey Grainger
 
What's Next: Cloudy with a chance of AI 3
What's Next: Cloudy with a chance of AI 3What's Next: Cloudy with a chance of AI 3
What's Next: Cloudy with a chance of AI 3Ogilvy Consulting
 
SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...
SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...
SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...Jonas Donbæk
 
Graphs are Eating the World
Graphs are Eating the WorldGraphs are Eating the World
Graphs are Eating the WorldAll Things Open
 
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’sMongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’sMongoDB
 
Big Data for Small Businesses & Startups
Big Data for Small Businesses & StartupsBig Data for Small Businesses & Startups
Big Data for Small Businesses & StartupsFujio Turner
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchlucenerevolution
 
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB
 
SMX West Structured Data Practical and Advanced
SMX West Structured Data Practical and AdvancedSMX West Structured Data Practical and Advanced
SMX West Structured Data Practical and AdvancedAlexis Sanders
 

Similar to PosterML (20)

Supercharging your Organic CTR
Supercharging your Organic CTRSupercharging your Organic CTR
Supercharging your Organic CTR
 
Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18Inbound Growth for SaaS Scale-Ups #INBOUND18
Inbound Growth for SaaS Scale-Ups #INBOUND18
 
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
 
There’s data everywhere! - Simo Ahava
There’s data everywhere! - Simo AhavaThere’s data everywhere! - Simo Ahava
There’s data everywhere! - Simo Ahava
 
B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...
B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...
B2BMF2019 - Demystifying the Buzz Words of Marketing Analytics - Ortect - Ivo...
 
Xomia_20220602.pptx
Xomia_20220602.pptxXomia_20220602.pptx
Xomia_20220602.pptx
 
7 Dimensions of Agile Analytics by Ken Collier
7 Dimensions of Agile Analytics by Ken Collier 7 Dimensions of Agile Analytics by Ken Collier
7 Dimensions of Agile Analytics by Ken Collier
 
danmcclary-pspresentation-katieboyle-171030115522.pdf
danmcclary-pspresentation-katieboyle-171030115522.pdfdanmcclary-pspresentation-katieboyle-171030115522.pdf
danmcclary-pspresentation-katieboyle-171030115522.pdf
 
Why Big and Small Data Is Important by Google's Product Manager
Why Big and Small Data Is Important by Google's Product ManagerWhy Big and Small Data Is Important by Google's Product Manager
Why Big and Small Data Is Important by Google's Product Manager
 
Data Analytics Practice at Paxcel
Data Analytics Practice at PaxcelData Analytics Practice at Paxcel
Data Analytics Practice at Paxcel
 
New seven management tools
New seven management toolsNew seven management tools
New seven management tools
 
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Leveraging Lucene/Solr as a Knowledge Graph and Intent EngineLeveraging Lucene/Solr as a Knowledge Graph and Intent Engine
Leveraging Lucene/Solr as a Knowledge Graph and Intent Engine
 
What's Next: Cloudy with a chance of AI 3
What's Next: Cloudy with a chance of AI 3What's Next: Cloudy with a chance of AI 3
What's Next: Cloudy with a chance of AI 3
 
SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...
SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...
SEO Campixx 2021 - How to win in seo when ads are taking up all the space [vi...
 
Graphs are Eating the World
Graphs are Eating the WorldGraphs are Eating the World
Graphs are Eating the World
 
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’sMongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’s
MongoDB World 2018: Pissing Off IT and Delivery: A Tale of 2 ODS’s
 
Big Data for Small Businesses & Startups
Big Data for Small Businesses & StartupsBig Data for Small Businesses & Startups
Big Data for Small Businesses & Startups
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic search
 
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS'sMongoDB.local Austin 2018:  Pissing Off IT and Delivery: A Tale of 2 ODS's
MongoDB.local Austin 2018: Pissing Off IT and Delivery: A Tale of 2 ODS's
 
SMX West Structured Data Practical and Advanced
SMX West Structured Data Practical and AdvancedSMX West Structured Data Practical and Advanced
SMX West Structured Data Practical and Advanced
 

PosterML

  • 1. Business Images + Captions xDTzv6a Test Data Business Labels xDTzv6a {1,3,5} Determine Businesses Labels Predict one Label per Picture Business Images + Captions Labels {1,3,5}Rdoi23s {2}Ox4geZ Multi Label businesses Single Label Businesses Supervised Learning on Data from Single Label Businesses Predict one Label per Picture Images + Captions Labels {2} {2} {2} Images + Captions Labels {1} {3} {3} {5} {2} {2} {2} Train Data Supervised Learning on Data from all Businesses Caption Classification model Image Classification CNN model Predictions Supervised ProblemSemi-supervised Problem Labelling Caption Classification model Merge Predictions (Average Probabilities) CHOCOLATE FOUNTAIN! Christina Bogdan Vincent Chabot Urjit Patel Overview Our goal throughout this project was to predict high level attributes related to venues based on pictures uploaded by customers on the Yelp platform. Typically, we were interested in predicting whether a restaurant would be ‘good for dinner’, ‘good for groups’ and/or ‘good for kids’. Each business could potentially have several true labels. There were mainly two major points of interest we had to deal with to solve this question : 1) Inferring very general attributes from images/caption analysis (rather than the most usual case of simply classifying the images based on the objects represented) 2) The labels to predict were only business level labels. From the fact that a business could have several true labels, we would not have direct access to individual image level labels, making the task semi-supervised. To solve this, we first isolated the images from businesses that had only one true label. We trained both an image based model and a caption based model in order predict individual labels on the remaining images associated with multi labels businesses. This would turn our initial problem into a supervised model, that we would solve by training another two image and caption based models. From the single image level predictions, we could eventually predict the business level multiple attributes. By only using images that are associated to single label businesses, we can perform fully supervised classification. We use the captions on these images to train a model using tf-idf. We then use this model to determine a unique picture- level label for the pictures associated to businesses with multi labels Image individual label retrieving via captions of images with unique label Good for Kids Good for Groups Good for Dinner MultinomialNBClassifier Train Accuracy Test Accuracy 0.8943 0.6662 Final Results Accross various classifiers, Linear SVC, SGD and Multinomial models gave the best accuracy. From the analysis of the words contributing the most to each class (bar chart above), we add additional stop words such as: 'page', 'restaurant', 'area', 'place', 'interior', 'outside', 'like', 'sauce', 'view' Data Understanding Our initial data consisted of two files. The first mapped each business to the various attributes we had to predict (possibly multiple true labels per business) : In the second data set, each row consisted of a picture id with its caption if any and the business it was related to: We can observe below that our classes were not evenly distributed. More particularly, we had very few ’good for dinner’ businesses. Furthermore, displaying the correlation between the target labels shows that businesses that are good for kids and those that are good for groups are relatively negatively correlated, as we could expect (as we show in the caption analysis part, good for group business are more related to key words as ’beer’, ’bar’, ‘night’, …) : Business multi labels prediction & Final results Finally, we predicted the business labels based on the predicted labels of the images associated to each business : if a business had at least one image with a given label, we would predict that label for the business as well. We expose below our final results : Images individual labels predictions From the merge predictions of both caption based and image based models (by simply averaging probability predictions), we predicted individual labels for each image of the test set by taking the label corresponding to the maximum predicted merged probability. Conclusion & Future Work Ultimately, we were able to improve on our random baseline with our joint CNN and caption-based model. If we had more time, we would have used another decision function to infer business labels from our prediction photo labels, instead of just taking the union of predicted labels across all photos. We would have also explored other methods to combine our predictions from our image and caption based models. Finally, we would have included our implementation of ∝SVM, which we believe would have helped us in our attempts to generate image- level labels. Images classification via both caption and image analysis Input: 3@96x96 64@24x24 128@8x8 256@8x8 256@4x4 256@4x4 256@4x4 256@2x2 256x2x2 256 3 Convolution + Normalization + ReLU + MaxPooling (4x4) Convolution + Normalization + ReLU + MaxPooling (3x3) Convolution + Normalization + ReLU Convolution + Normalization + ReLU + MaxPooling (2x2) Convolution + Normalization + ReLU Convolution + Normalization + ReLU Convolution + Normalization + ReLU + MaxPooling (2x2) Full Connection Linear Transforrmation + DropOut Normalization + ReLU + Dropout + Linear Transforrmation Data Augmentation on Good for Dinner class to generate more data Data Augmentation on Input CNNClassifier Train Accuracy 0. 6711 0. 6021Test Accuracy Final Results (after 92 epochs)Data Augmentation Original Normalized Input Images Augmented Normalized Input Images Once recovered what we feel confident in being images unique labels, we trained 2 fully supervised models separately : 1) A text classifier on the images captions, using the exact same methodology as before 2) A Convolutional Neural Network on the images, which architecture and results are exposed in this section Visualization of the 128 feature maps of the second layer Training & validation mean class accuracy f(epochs) 0.9318Precision Recall 0.5405 0.6841F1 score Could you tell us, by looking at this picture, if this restaurant looks rather good for kids? Would you rather recommend it as takeaway or for dinner? This is typically the kind of high level, context information customers would like to know before choosing the next restaurant to go to. The kind of questions you could ask a friend that you know already went to this place for example. But what if your favorite recommendation platform / research engine / social network could answer all your questions? Of course, it is not easy to find data that carry such high level information. But both the large amount of pictures uploaded by customers and possibilities offered by machine learning and deep learning techniques makes it interesting to try to answer such questions. Business Case