SlideShare a Scribd company logo
1 of 55
Download to read offline
Data Science | Design | Technology
(October 24, 2017)
https://www.meetup.com/DSDTMTL
1
Agenda 6:00 - 6:15: Welcome
6:15 - 7:00: Inventory Optimization
7:00 - 7:30: Graph Databases
7:30 - 8:00: Q&A + Networking
2
Optimization Algorithms & Graph
Structures
Tools for Better Decision Making
Tools for Better
Decision Making
Inventory
Optimization
Data Science | Design | Technology 3
(Source: https://en.wikipedia.org/wiki/Markov_decision_process)
4
INVENTORY OPTIMIZATION :
HOW TO DEAL WITH SLOW-MOVING ITEMS
WHAT IS INVENTORY
OPTIMIZATION?
You all do it!
0
10
20
30
40
50
60
demand inventory total inventory
WHAT IS INVENTORY OPTIMIZATION?
s
S
LEADTIME
PREDICTIVE
PRESCRIPTIVE
0
10
20
30
40
50
60
demand inventory total inventory
WHAT IS INVENTORY OPTIMIZATION?
s
S
LEADTIME
FORECASTING
Predictive
0
5
10
15
20
25
30
8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017
Fast moving sales
Up to
75%*
of Retail products
are slow Moving
*https://smartech.gatech.edu/bitstream/handle/1853/13469/Managing%20Slow%20Moving%20Perishables%20in%20the%20
Grocery%20Industry.pdf
SLOW-MOVING ITEMS
Slow-movers are products with very
low sales, maybe one unit per week
or even less.
They are important!
Where are slow-movers?
0
1
2
3
8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017
Slow moving sales
0
1
2
3
8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017
Slow moving sales
0 1 2
0 1 2 3
0 1 2
MAXIMUM LIKELIHOOD
ESTIMATION
1
6
1
1
MAXIMUM LIKELIHOOD
ESTIMATION
What is the cause most likely to
produce the observed effect.
0
1
2
3
8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017
Slow moving sales
0 1 2
0 1 2 3
0 1 2
MAXIMUM LIKELIHOOD
ESTIMATION
OPTIMIZATION
Prescriptive
S
s
Time
But we want the best (s, S) policy!
It must minimize costs and match a service level.
INVENTORY
OPTIMIZATION
(s, S) Policy
When the inventory contains s or less items, an
order is made to reach level S.
Order &
shipping cost
Inventory cost Backorders
Service level
80%
DEMAND
FORECAST
INVENTORY OPTIMIZATION FULFILLMENT
Demand distribution profile
Normal Poisson
(mean, variance) (mean)
Stationary (long term)
demand distribution
Lead time distribution profile
Normal Poisson
(mean, variance) (mean)
Uncertainty profiles
selection
Optimization Inventory
Policy
(s, S)
TRADITIONAL
INVENTORY
OPTIMIZATION
Slow moversFast movers
SLOW-MOVERS VS
FAST MOVERS
23
Markov Decision Process vs traditional inventory optimization
Normal Poisson
(mean, variance) (mean)
Uncertainty profiles selection
(s, S)
Optimization Inventory Policy
DEMAND
FORECAST
INVENTORY OPTIMIZATION FULFILLMENT
EOQ
ROP
DISCRETE DEMAND
DISTRIBUTION
PERIOD 1 PERIOD 2 PERIOD 3
1
+0
+1
+2
+3
-1
0
1
2
3
-1
0
1
2
3
2
1
0
3%
20%
77% 1
0
50%
50%
+0
+1
+2
+3
1
0
50%
50%
MARKOV DECISION PROCESS
Empirical Distribution
Distributional Forecast
0 4 5 6 7 10 25
qty
probability
35%
30%
5% 5%
10% 10%
5%
OR
MARKOV DECISION PROCESS
• Andrey Andreyevich Markov
• Based on
• the probability to transition from one state to
another
• the possible actions
• The cost associated to each state and action
• What is the best action at each state?
STATES
ACTIONS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
ORDER QUANTITIES
INVENTORY COSTS
TRANSITIONS
REWARDS
25
2
1
0
3%
20%
77%
Period 2 Period 3
STATES
ACTIONS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
ORDER QUANTITIES
1
INVENTORY COSTS
TRANSITIONS
REWARDS
0
-1
1
2
3
4
INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS
MARKOV DECISION PROCESS
2
1
0
3%
20%
77%
2
1
0
3%
20%
77%
0
-1
1
2
3
4
+ 0
+ 1
+ 2
+ 3
Period 1
$60
$60
$60
$10
26
Period 2 Period 3
2 3%
STATES
ACTIONS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
ORDER QUANTITIES
1
INVENTORY COSTS
0
-1
1
2
3
4
+ 0
+ 1
+ 2
+ 3
$60
$60
$60
$10
Period 1
TRANSITIONS
REWARDS
0
-1
1
2
3
4
+ 0
+ 1
+ 2
+ 3
$1050
$1050
$1050
$1000
INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS
MARKOV DECISION PROCESS
27
1
0
50%
50%
Period 2 Period 3
STATES
ACTIONS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
ORDER QUANTITIES
1
INVENTORY COSTS
0
-1
1
2
3
4
+ 0
+ 1
+ 2
+ 3
$60
$60
$60
$10
Period 1
TRANSITIONS
REWARDS
0
-1
1
2
3
4
2 3%
+ 0
+ 1
+ 2
+ 3
$60
$60
$60
$10
0 20%
1 77%
1
0
50%
50%
INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS
MARKOV DECISION PROCESS
28
Period 2 Period 3
STATES
ACTIONS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
ORDER QUANTITIES
2
1
0
3%
20%
77%
1
INVENTORY COSTS
0
-1
1
2
3
4
+ 1
$60
Period 1
TRANSITIONS
REWARDS
1
0
50%
50%
+ 0
$10
1
0
50%
50%
+ 0
$20
1
0
50%
50%
+ 3
$60
+ 2
$50
+ 0
$20
+ 3
$60
+ 0
$30
0
-1
1
2
3
4
3%
32%
47%
18%
0
-1
1
2
3
4
INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS RESULT: DYNAMIC POLICY
MARKOV DECISION PROCESS
29
2
1
0
3%
20%
77%
STATES
ACTIONS
TRANSITIONS
REWARDS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
EXPECTED LEADTIME
ORDER QUANTITIES
2
1
0
3%
20%
77%
INVENTORY COSTS
2
1
0
3%
20%
77%
0
-1
1
2
3
4
+ 0
+ 1
+ 2
+ 3
$60
$60
$60
$10
INDIVIDUAL ITEM AT A SINGLE LOCATION STEADY STATE
0
-1
1
2
3
4
MARKOV DECISION PROCESS
30
2
1
0
3%
20%
77%
STATES
ACTIONS
TRANSITIONS
REWARDS
INVENTORY QUANTITIES
DEMAND DISTRIBUTION
EXPECTED LEADTIME
ORDER QUANTITIES
2
1
0
3%
20%
77%
INVENTORY COSTS
2
1
0
3%
20%
77%
0
-1
1
2
3
4
+ 0
+ 1
+ 2
+ 3
$70
$70
$70
$20
INDIVIDUAL ITEM AT A SINGLE LOCATION STEADY STATE RESULT: STATIC POLICY
INVENTORY
QUANTITY -1 0 1 2 3 4 5 6
OPTIMAL ORDER
QUANTITY 6 6 5 4 0 0 0 0
(2, 6)
0
-1
1
2
3
4
WHAT IS THE SERVICE LEVEL????
MARKOV DECISION PROCESS
Initial states
Final states
Demand probabilities:
Expected service level
Order 0 unit
State Expected service level
-2 (1 – 0.0169 – 0.2262) = 0.7569
-1 (1 – 0.0169 – 0.2262) = 0.7569
0 (1 – 0.0169 – 0.2262) = 0.7569
1 (1 – 0.0169 - 0 ) = 0.9831
2 (1 – 0 – 0) = 1.0
… …
Inventor optimization is about balancing cost and
service level
Slow movers are a large part of most inventories
They must be handled differently than fast movers
• Through better forecast
• Specialized optimization algorithms
CONCLUSION
Tools for Better
Decision Making
Graph Databases
Data Science | Design | Technology 34
(Source: http://docs.janusgraph.org/latest/getting-started.html)
Graph Databases,
When Relationships Matter
Fraud Detection
Recommendation
Engines
• Growing processing complexity
• Massive growth in volumes of data
• Greater demand
• Real-time processing constraints
Context
Can Relational
DBs Do It?
• Identify patterns of relationships between records
• Join relevant tables together
• Number of joins can quickly increase
• Wildcard search cannot be done using SQL queries
Can Relational
DBs Do It?
Graph DBs to the
Rescue
• A database management system with CRUD
operations working on a graph data model
• Part of the NoSQL family
• Graph data model: composed of vertices, edges and
attributes
• Nodes represent entities
• Edges represent associations between vertices
What is a Graph
Database?
Fraud Detection
• Neo4j: most popular graph database
• JanusGraph: graph framework with a variety of
storage (BigTable, HBase and Cassandra) and
indexing (Elasticsearch, Solr and Lucene)
backends
• ArangoDB: multi-model (graph, document and
key-value) database
Popular Graph
Databases
Let’s Try It On The Cloud
• Low latency
• Horizontal autoscaling
• Resilient
Requirements
• Configuration 1: Single-node Neo4j DB
• Configuration 2: JanusGraph with a single-node
Cassandra backend
• Configuration 3: JanusGraph with a 3-node HBase
backend
• DB and Java application running on the same
Kubernetes cluster
What We Have
Tried
Results Neo4j JanusGraph
Resilience HA cluster with a master-
slave replication setup.
Traffic can be directed to
slave as a failover plan.
Available only in
Enterprise Edition.
Both Cassandra and
HBase provide a
replication mechanism.
Traffic can be directed to
a second JanusGrpah
instance.
Horizontal Autoscaling - Additional nodes can be added at runtime to a HA
cluster
- Both Kubernetes and GKE support horizontal
autoscaling
- Disks cannot be dynamically provisioned on
Kubernetes
Querying the Database - Cypher query
language
- Drivers
- Gremlin query
language
- Java driver
• Powerful in analyzing relationships
• Cannot be used as a main data store
• Adds more complexity to code (transaction
management)
• Cluster management requires admin knowledge
• HBase requires knowledge of the Hadoop
ecosystem
• Current stable Kubernetes supports only CPU
autoscaling
Lessons Learned
Based on our constraints
and experiments
Demo
• BigTable as a backend
• Voice commands
• ArangoDB
Future Work
• Meetup group created in April 2017
• Now 952 members (Oct 24th)
• One meetup per month.
• This is your meetup! Propose topics
you would like to present
Data Science | Design | Technology
53
members…..Once we reach
… one lucky participant of our
meetups will win a prize!
Invite your friends to join
the DSDT group
Next
Meetup
Nov 14
54
Co-presentation on cloud data
streaming with
Merci / Thank You
55
@jdalabsmtl
Data Science | Design | Technology
(Check for next DSDT meetup at https://www.meetup.com/DSDTMTL)

More Related Content

Similar to Graph Databases, Fraud Detection and Recommendations

How to Use Big Data to Transform IT Operations
How to Use Big Data to Transform IT OperationsHow to Use Big Data to Transform IT Operations
How to Use Big Data to Transform IT OperationsExtraHop Networks
 
Paradigmas de procesamiento en Big Data: estado actual, tendencias y oportu...
Paradigmas de procesamiento en  Big Data: estado actual,  tendencias y oportu...Paradigmas de procesamiento en  Big Data: estado actual,  tendencias y oportu...
Paradigmas de procesamiento en Big Data: estado actual, tendencias y oportu...Facultad de Informática UCM
 
DockerCon SF 2019 - Observability Workshop
DockerCon SF 2019 - Observability WorkshopDockerCon SF 2019 - Observability Workshop
DockerCon SF 2019 - Observability WorkshopKevin Crawley
 
Big Data Ecosystem for Data-Driven Decision Making
Big Data Ecosystem for Data-Driven Decision MakingBig Data Ecosystem for Data-Driven Decision Making
Big Data Ecosystem for Data-Driven Decision MakingAbzetdin Adamov
 
20160000 Cloud Discovery Event - Cloud Access Security Brokers
20160000 Cloud Discovery Event - Cloud Access Security Brokers20160000 Cloud Discovery Event - Cloud Access Security Brokers
20160000 Cloud Discovery Event - Cloud Access Security BrokersRobin Vermeirsch
 
Big Data Paris : Hadoop and NoSQL
Big Data Paris : Hadoop and NoSQLBig Data Paris : Hadoop and NoSQL
Big Data Paris : Hadoop and NoSQLTugdual Grall
 
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing EcosystemsAmazon Web Services
 
Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?Clustrix
 
Stream Processing in Uber
Stream Processing in UberStream Processing in Uber
Stream Processing in UberC4Media
 
RS in the context of Big Data-v4
RS in the context of Big Data-v4RS in the context of Big Data-v4
RS in the context of Big Data-v4Khadija Atiya
 
Delivering fast, powerful and scalable analytics
Delivering fast, powerful and scalable analyticsDelivering fast, powerful and scalable analytics
Delivering fast, powerful and scalable analyticsMariaDB plc
 
Disruptive Technologies
Disruptive TechnologiesDisruptive Technologies
Disruptive TechnologiesEran Stiller
 
Tapping the cloud for real time data analytics
 Tapping the cloud for real time data analytics Tapping the cloud for real time data analytics
Tapping the cloud for real time data analyticsAmazon Web Services
 
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander ZaitsevClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander ZaitsevAltinity Ltd
 
Where Should You Deliver Database Services From?
Where Should You Deliver Database Services From?Where Should You Deliver Database Services From?
Where Should You Deliver Database Services From?EDB
 
Migrating to MongoDB: Best Practices
Migrating to MongoDB: Best PracticesMigrating to MongoDB: Best Practices
Migrating to MongoDB: Best PracticesMongoDB
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftSnapLogic
 
Big Data Storage Challenges and Solutions
Big Data Storage Challenges and SolutionsBig Data Storage Challenges and Solutions
Big Data Storage Challenges and SolutionsWSO2
 

Similar to Graph Databases, Fraud Detection and Recommendations (20)

Advanced Analytics in Banking, CITI
Advanced Analytics in Banking, CITIAdvanced Analytics in Banking, CITI
Advanced Analytics in Banking, CITI
 
How to Use Big Data to Transform IT Operations
How to Use Big Data to Transform IT OperationsHow to Use Big Data to Transform IT Operations
How to Use Big Data to Transform IT Operations
 
Paradigmas de procesamiento en Big Data: estado actual, tendencias y oportu...
Paradigmas de procesamiento en  Big Data: estado actual,  tendencias y oportu...Paradigmas de procesamiento en  Big Data: estado actual,  tendencias y oportu...
Paradigmas de procesamiento en Big Data: estado actual, tendencias y oportu...
 
DockerCon SF 2019 - Observability Workshop
DockerCon SF 2019 - Observability WorkshopDockerCon SF 2019 - Observability Workshop
DockerCon SF 2019 - Observability Workshop
 
Big Data Ecosystem for Data-Driven Decision Making
Big Data Ecosystem for Data-Driven Decision MakingBig Data Ecosystem for Data-Driven Decision Making
Big Data Ecosystem for Data-Driven Decision Making
 
20160000 Cloud Discovery Event - Cloud Access Security Brokers
20160000 Cloud Discovery Event - Cloud Access Security Brokers20160000 Cloud Discovery Event - Cloud Access Security Brokers
20160000 Cloud Discovery Event - Cloud Access Security Brokers
 
Big Data Paris : Hadoop and NoSQL
Big Data Paris : Hadoop and NoSQLBig Data Paris : Hadoop and NoSQL
Big Data Paris : Hadoop and NoSQL
 
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
(BDT207) Real-Time Analytics In Service Of Self-Healing Ecosystems
 
Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?
 
Stream Processing in Uber
Stream Processing in UberStream Processing in Uber
Stream Processing in Uber
 
RS in the context of Big Data-v4
RS in the context of Big Data-v4RS in the context of Big Data-v4
RS in the context of Big Data-v4
 
Nic solution strategy
Nic solution strategyNic solution strategy
Nic solution strategy
 
Delivering fast, powerful and scalable analytics
Delivering fast, powerful and scalable analyticsDelivering fast, powerful and scalable analytics
Delivering fast, powerful and scalable analytics
 
Disruptive Technologies
Disruptive TechnologiesDisruptive Technologies
Disruptive Technologies
 
Tapping the cloud for real time data analytics
 Tapping the cloud for real time data analytics Tapping the cloud for real time data analytics
Tapping the cloud for real time data analytics
 
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander ZaitsevClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
ClickHouse in Real Life. Case Studies and Best Practices, by Alexander Zaitsev
 
Where Should You Deliver Database Services From?
Where Should You Deliver Database Services From?Where Should You Deliver Database Services From?
Where Should You Deliver Database Services From?
 
Migrating to MongoDB: Best Practices
Migrating to MongoDB: Best PracticesMigrating to MongoDB: Best Practices
Migrating to MongoDB: Best Practices
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
 
Big Data Storage Challenges and Solutions
Big Data Storage Challenges and SolutionsBig Data Storage Challenges and Solutions
Big Data Storage Challenges and Solutions
 

More from JDA Labs MTL

Dsdt meetup july2018
Dsdt meetup july2018Dsdt meetup july2018
Dsdt meetup july2018JDA Labs MTL
 
Dsdt meetup june 5
Dsdt meetup june 5Dsdt meetup june 5
Dsdt meetup june 5JDA Labs MTL
 
Chi visualization papers
Chi visualization papersChi visualization papers
Chi visualization papersJDA Labs MTL
 
Dsdt meetup-january2018
Dsdt meetup-january2018Dsdt meetup-january2018
Dsdt meetup-january2018JDA Labs MTL
 
Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21JDA Labs MTL
 
Dsdt meetup-september12
Dsdt meetup-september12Dsdt meetup-september12
Dsdt meetup-september12JDA Labs MTL
 
Dsdt meetup july11
Dsdt meetup july11Dsdt meetup july11
Dsdt meetup july11JDA Labs MTL
 
DSDT Meetup may 23
DSDT Meetup may 23DSDT Meetup may 23
DSDT Meetup may 23JDA Labs MTL
 

More from JDA Labs MTL (10)

Dsdt meetup july2018
Dsdt meetup july2018Dsdt meetup july2018
Dsdt meetup july2018
 
Dsdt meetup 2018
Dsdt meetup 2018 Dsdt meetup 2018
Dsdt meetup 2018
 
Dsdt meetup june 5
Dsdt meetup june 5Dsdt meetup june 5
Dsdt meetup june 5
 
Chi visualization papers
Chi visualization papersChi visualization papers
Chi visualization papers
 
Dsdt meetup may1
Dsdt meetup may1Dsdt meetup may1
Dsdt meetup may1
 
Dsdt meetup-january2018
Dsdt meetup-january2018Dsdt meetup-january2018
Dsdt meetup-january2018
 
Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21
 
Dsdt meetup-september12
Dsdt meetup-september12Dsdt meetup-september12
Dsdt meetup-september12
 
Dsdt meetup july11
Dsdt meetup july11Dsdt meetup july11
Dsdt meetup july11
 
DSDT Meetup may 23
DSDT Meetup may 23DSDT Meetup may 23
DSDT Meetup may 23
 

Recently uploaded

Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 

Recently uploaded (20)

Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 

Graph Databases, Fraud Detection and Recommendations

  • 1. Data Science | Design | Technology (October 24, 2017) https://www.meetup.com/DSDTMTL 1
  • 2. Agenda 6:00 - 6:15: Welcome 6:15 - 7:00: Inventory Optimization 7:00 - 7:30: Graph Databases 7:30 - 8:00: Q&A + Networking 2 Optimization Algorithms & Graph Structures Tools for Better Decision Making
  • 3. Tools for Better Decision Making Inventory Optimization Data Science | Design | Technology 3 (Source: https://en.wikipedia.org/wiki/Markov_decision_process)
  • 4. 4 INVENTORY OPTIMIZATION : HOW TO DEAL WITH SLOW-MOVING ITEMS
  • 6. 0 10 20 30 40 50 60 demand inventory total inventory WHAT IS INVENTORY OPTIMIZATION? s S LEADTIME PREDICTIVE PRESCRIPTIVE
  • 7. 0 10 20 30 40 50 60 demand inventory total inventory WHAT IS INVENTORY OPTIMIZATION? s S LEADTIME
  • 9. 0 5 10 15 20 25 30 8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017 Fast moving sales
  • 10. Up to 75%* of Retail products are slow Moving *https://smartech.gatech.edu/bitstream/handle/1853/13469/Managing%20Slow%20Moving%20Perishables%20in%20the%20 Grocery%20Industry.pdf SLOW-MOVING ITEMS Slow-movers are products with very low sales, maybe one unit per week or even less. They are important!
  • 12. 0 1 2 3 8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017 Slow moving sales
  • 13. 0 1 2 3 8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017 Slow moving sales 0 1 2 0 1 2 3 0 1 2
  • 15. MAXIMUM LIKELIHOOD ESTIMATION What is the cause most likely to produce the observed effect.
  • 16. 0 1 2 3 8/8/2017 8/22/2017 9/5/2017 9/19/2017 10/3/2017 10/17/2017 10/31/2017 11/14/2017 Slow moving sales 0 1 2 0 1 2 3 0 1 2 MAXIMUM LIKELIHOOD ESTIMATION
  • 18. S s Time But we want the best (s, S) policy! It must minimize costs and match a service level. INVENTORY OPTIMIZATION (s, S) Policy When the inventory contains s or less items, an order is made to reach level S.
  • 21. DEMAND FORECAST INVENTORY OPTIMIZATION FULFILLMENT Demand distribution profile Normal Poisson (mean, variance) (mean) Stationary (long term) demand distribution Lead time distribution profile Normal Poisson (mean, variance) (mean) Uncertainty profiles selection Optimization Inventory Policy (s, S) TRADITIONAL INVENTORY OPTIMIZATION
  • 23. 23 Markov Decision Process vs traditional inventory optimization Normal Poisson (mean, variance) (mean) Uncertainty profiles selection (s, S) Optimization Inventory Policy DEMAND FORECAST INVENTORY OPTIMIZATION FULFILLMENT EOQ ROP DISCRETE DEMAND DISTRIBUTION PERIOD 1 PERIOD 2 PERIOD 3 1 +0 +1 +2 +3 -1 0 1 2 3 -1 0 1 2 3 2 1 0 3% 20% 77% 1 0 50% 50% +0 +1 +2 +3 1 0 50% 50% MARKOV DECISION PROCESS Empirical Distribution Distributional Forecast 0 4 5 6 7 10 25 qty probability 35% 30% 5% 5% 10% 10% 5% OR
  • 24. MARKOV DECISION PROCESS • Andrey Andreyevich Markov • Based on • the probability to transition from one state to another • the possible actions • The cost associated to each state and action • What is the best action at each state? STATES ACTIONS INVENTORY QUANTITIES DEMAND DISTRIBUTION ORDER QUANTITIES INVENTORY COSTS TRANSITIONS REWARDS
  • 25. 25 2 1 0 3% 20% 77% Period 2 Period 3 STATES ACTIONS INVENTORY QUANTITIES DEMAND DISTRIBUTION ORDER QUANTITIES 1 INVENTORY COSTS TRANSITIONS REWARDS 0 -1 1 2 3 4 INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS MARKOV DECISION PROCESS 2 1 0 3% 20% 77% 2 1 0 3% 20% 77% 0 -1 1 2 3 4 + 0 + 1 + 2 + 3 Period 1 $60 $60 $60 $10
  • 26. 26 Period 2 Period 3 2 3% STATES ACTIONS INVENTORY QUANTITIES DEMAND DISTRIBUTION ORDER QUANTITIES 1 INVENTORY COSTS 0 -1 1 2 3 4 + 0 + 1 + 2 + 3 $60 $60 $60 $10 Period 1 TRANSITIONS REWARDS 0 -1 1 2 3 4 + 0 + 1 + 2 + 3 $1050 $1050 $1050 $1000 INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS MARKOV DECISION PROCESS
  • 27. 27 1 0 50% 50% Period 2 Period 3 STATES ACTIONS INVENTORY QUANTITIES DEMAND DISTRIBUTION ORDER QUANTITIES 1 INVENTORY COSTS 0 -1 1 2 3 4 + 0 + 1 + 2 + 3 $60 $60 $60 $10 Period 1 TRANSITIONS REWARDS 0 -1 1 2 3 4 2 3% + 0 + 1 + 2 + 3 $60 $60 $60 $10 0 20% 1 77% 1 0 50% 50% INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS MARKOV DECISION PROCESS
  • 28. 28 Period 2 Period 3 STATES ACTIONS INVENTORY QUANTITIES DEMAND DISTRIBUTION ORDER QUANTITIES 2 1 0 3% 20% 77% 1 INVENTORY COSTS 0 -1 1 2 3 4 + 1 $60 Period 1 TRANSITIONS REWARDS 1 0 50% 50% + 0 $10 1 0 50% 50% + 0 $20 1 0 50% 50% + 3 $60 + 2 $50 + 0 $20 + 3 $60 + 0 $30 0 -1 1 2 3 4 3% 32% 47% 18% 0 -1 1 2 3 4 INDIVIDUAL ITEM AT A SINGLE LOCATION OVER 3 PERIODS RESULT: DYNAMIC POLICY MARKOV DECISION PROCESS
  • 29. 29 2 1 0 3% 20% 77% STATES ACTIONS TRANSITIONS REWARDS INVENTORY QUANTITIES DEMAND DISTRIBUTION EXPECTED LEADTIME ORDER QUANTITIES 2 1 0 3% 20% 77% INVENTORY COSTS 2 1 0 3% 20% 77% 0 -1 1 2 3 4 + 0 + 1 + 2 + 3 $60 $60 $60 $10 INDIVIDUAL ITEM AT A SINGLE LOCATION STEADY STATE 0 -1 1 2 3 4 MARKOV DECISION PROCESS
  • 30. 30 2 1 0 3% 20% 77% STATES ACTIONS TRANSITIONS REWARDS INVENTORY QUANTITIES DEMAND DISTRIBUTION EXPECTED LEADTIME ORDER QUANTITIES 2 1 0 3% 20% 77% INVENTORY COSTS 2 1 0 3% 20% 77% 0 -1 1 2 3 4 + 0 + 1 + 2 + 3 $70 $70 $70 $20 INDIVIDUAL ITEM AT A SINGLE LOCATION STEADY STATE RESULT: STATIC POLICY INVENTORY QUANTITY -1 0 1 2 3 4 5 6 OPTIMAL ORDER QUANTITY 6 6 5 4 0 0 0 0 (2, 6) 0 -1 1 2 3 4 WHAT IS THE SERVICE LEVEL???? MARKOV DECISION PROCESS
  • 32. Expected service level Order 0 unit State Expected service level -2 (1 – 0.0169 – 0.2262) = 0.7569 -1 (1 – 0.0169 – 0.2262) = 0.7569 0 (1 – 0.0169 – 0.2262) = 0.7569 1 (1 – 0.0169 - 0 ) = 0.9831 2 (1 – 0 – 0) = 1.0 … …
  • 33. Inventor optimization is about balancing cost and service level Slow movers are a large part of most inventories They must be handled differently than fast movers • Through better forecast • Specialized optimization algorithms CONCLUSION
  • 34. Tools for Better Decision Making Graph Databases Data Science | Design | Technology 34 (Source: http://docs.janusgraph.org/latest/getting-started.html)
  • 38. • Growing processing complexity • Massive growth in volumes of data • Greater demand • Real-time processing constraints Context
  • 40. • Identify patterns of relationships between records • Join relevant tables together • Number of joins can quickly increase • Wildcard search cannot be done using SQL queries Can Relational DBs Do It?
  • 41. Graph DBs to the Rescue
  • 42. • A database management system with CRUD operations working on a graph data model • Part of the NoSQL family • Graph data model: composed of vertices, edges and attributes • Nodes represent entities • Edges represent associations between vertices What is a Graph Database?
  • 44. • Neo4j: most popular graph database • JanusGraph: graph framework with a variety of storage (BigTable, HBase and Cassandra) and indexing (Elasticsearch, Solr and Lucene) backends • ArangoDB: multi-model (graph, document and key-value) database Popular Graph Databases
  • 45. Let’s Try It On The Cloud
  • 46. • Low latency • Horizontal autoscaling • Resilient Requirements
  • 47. • Configuration 1: Single-node Neo4j DB • Configuration 2: JanusGraph with a single-node Cassandra backend • Configuration 3: JanusGraph with a 3-node HBase backend • DB and Java application running on the same Kubernetes cluster What We Have Tried
  • 48. Results Neo4j JanusGraph Resilience HA cluster with a master- slave replication setup. Traffic can be directed to slave as a failover plan. Available only in Enterprise Edition. Both Cassandra and HBase provide a replication mechanism. Traffic can be directed to a second JanusGrpah instance. Horizontal Autoscaling - Additional nodes can be added at runtime to a HA cluster - Both Kubernetes and GKE support horizontal autoscaling - Disks cannot be dynamically provisioned on Kubernetes Querying the Database - Cypher query language - Drivers - Gremlin query language - Java driver
  • 49. • Powerful in analyzing relationships • Cannot be used as a main data store • Adds more complexity to code (transaction management) • Cluster management requires admin knowledge • HBase requires knowledge of the Hadoop ecosystem • Current stable Kubernetes supports only CPU autoscaling Lessons Learned Based on our constraints and experiments
  • 50. Demo
  • 51. • BigTable as a backend • Voice commands • ArangoDB Future Work
  • 52. • Meetup group created in April 2017 • Now 952 members (Oct 24th) • One meetup per month. • This is your meetup! Propose topics you would like to present Data Science | Design | Technology
  • 53. 53 members…..Once we reach … one lucky participant of our meetups will win a prize! Invite your friends to join the DSDT group
  • 54. Next Meetup Nov 14 54 Co-presentation on cloud data streaming with
  • 55. Merci / Thank You 55 @jdalabsmtl Data Science | Design | Technology (Check for next DSDT meetup at https://www.meetup.com/DSDTMTL)