SlideShare une entreprise Scribd logo
1  sur  35
Practical Insights into Fuzzy Logic
Dileepa Jayathilake
Manager Research – 99X Technology
Cofounder - Tracified
A bit about me
• Started with AI as an undergrad 16 years back
• Developed Sinhala Text-to-Speech and Speech Recognition using Artificial
Neural Networks and Hidden Markov Models
• Authored the open source fuzzy logic library ALLib
• Applied fuzzy logic in few industrial cases in Norway and China
• More recently worked on Brain Wave Analysis
• Current research interests: Blockchain, AI
What is Fuzzy Logic?
• AI technique to use when you want to combine human concepts
(which are inherently of vague nature) with computing
• Solves problems where crisp logic fails
What is fuzzy logic good for today?
Fuzzy Logic should be applied in cases where we have minimal
knowledge about the process to be modelled
- from a Fuzzy Logic Book from 90’s
?
Business Case 1: Geo-fencing
Sailor wants the app to wake him up if
the anchor is broken and the boat is
being dragged by wind
Perfect World Solution
Anchor
Location
Current
Location
Distance Moved (d)
Did the boat move by more than a predefined distance?
Location Readings are not perfect
Anchor
Location
Current
Location
Location readings are received along with a tolerance
T1
T2
Distance Moved (d)
Actual movement can be anything between d – T1 – T2 and d + T1 + T2
Tolerance can be Mild or Wild
• High Accuracy Mode
• Tolerance values are low
• Readings are received frequently
• Low Accuracy Mode
• Tolerance values are high
• Readings are received sparingly
It’s important to know which mode we are in
• In high accuracy mode
• Happily ignore intermittent readings with high tolerance
• Wait for the reading with best accuracy and treat it as a perfect reading
• In low accuracy mode
• Try to make use of every reading as only few readings are received
• Apply a geometric correction
Mode changes over time
• Apply ‘mode recognition logic’ periodically
• Lets say every 30 seconds
• Then use the correct approach to find answer to the question
“Should we ring the alarm?”
Determining the mode using Crisp Logic
Example:
If BEST_TOLERANCE < 20m && READING_COUNT >= 15
Mode = HIGH_ACCURACY
Else
Mode = LOW_ACCURACY
Now consider following 3 cases
Best Tolerance Reading Count
Case 1 18 15
Case 2 21 15
Case 3 18 13
Only Case 1 qualifies as High Accuracy
mode while intuition suggests that all 3
cases must be same mode
Alternative
Can’t we write the logic in a form like:
If BEST_TOLERANCE is LOW and READINGS_COUNT is VERY_HIGH Then there is a VERY_HIGH
possibility that we are in HIGH_ACCURACY Mode
Then we express our intuition on the case with further such rules:
If BEST_TOLERANCE is MEDIUM and READINGS_COUNT is MORE_OR_LESS_HIGH Then there is a
MEDIUM possibility that we are in HIGH_ACCURACY Mode
If BEST_TOLERANCE is VERY_HIGH and READINGS_COUNT is LOW Then there is a LOW possibility
that we are in HIGH_ACCURACY Mode
Bridging Human World and Machine World
Humans think in terms of concepts Machines think in terms of numbers
Can we build a logic to bridge these two worlds?
New form of the solution
We express our intuition on the case as a Rulebase built out of concepts
If BEST_TOLERANCE is LOW and READINGS_COUNT is VERY_HIGH Then there is a VERY_HIGH
possibility that we are in HIGH_ACCURACY Mode
If BEST_TOLERANCE is MEDIUM and READINGS_COUNT is MORE_OR_LESS_HIGH Then there is a
MEDIUM possibility that we are in HIGH_ACCURACY Mode
If BEST_TOLERANCE is VERY_HIGH and READINGS_COUNT is LOW Then there is a LOW possibility
that we are in HIGH_ACCURACY Mode
Then the machine solves the problem for us numerically!
BEST_TOLERANCE = 12 && READINGS_COUNT = 18 Mode = HIGH_ACCURACY
Possibility: The key to bridge the two worlds
Probability
Likelihood
Proportion
Possibility
Feasibility
Ease of Attainment
Possibility Distribution Function
Possibility
Value
X
1.0
0
Counterpart in the probability world is Probability Distribution Function
Membership Function
Possibility
Value
Low (Reading Count)
1.0
0
Counterpart in the probability world is Singular Value
2 15
Meaning of X is LOW
Possibility
Value
1.0
0
2 15
• When we don’t have any more information about X, pdf for ‘X is LOW’ is the membership function of LOW
• When we know X’s pdf, the pdf for ‘X is LOW’ is mf(LOW) o pdf(X)
Fuzzy Inference
Output pdf = ALSO{(input AND inputrulebase)IF-THEN outputrulebase}
Solution Configuration
Tolerance 1 = 8m ; Tolerance 2 = 15m ; Reading Count = 12
Is High Accuracy Mode?
Fuzzification & Defuzzification
Fuzzification Fuzzy
Inference
DeFuzzification
Fuzzy
Rulebase
Tolerance 1
Tolerance 2
pdf
pdf
pdf [0 … 1]
Challenges
• Defining membership functions
• Incompleteness of rulebase
Business Case 2: Customer Trust Index
How to quantify business value of a customer when you have sales data over a period?
Quantity : Total amount a customer has spent
Regularity : Frequency of Purchasing
Consistency : Predictability of the customer
Direct Solution
Parameter High Score Low Score
Quantity 10 1
Regularity 5 3
Predictability 8 2
E.g. Score(High Quantity, Low Regularity, Low Predictability) = 10 * 3 * 2 = 60
Fuzzy Logic based Solution
Define fuzzy input variables Quantity, Regularity and Predictability
Define fuzzy sets for each input variable’s domain
High_Value, Medium_Value, Somewhat_Low_Value, Insignificant_Value, …,Frequent, Regular, Occational, …, Recurring, Quasi-Predictable, Adhoc, …
Define fuzzy output variable Trust Index
Define fuzzy sets for output variable’s domain
Regular_Customer, Experimentor, Endorser, Adhoc_Customer, …
Define rulebase
If (Quantity is Somewhat_Low_Value) AND (Regularity is Frequent) Then Trust Index is Experimentor
If (Quantity is High_Value) AND (Regularity is Regular) AND (Predictability is Quasi-Predictable) Then Trust Index is Endorser
Ask the question: If Quantity = 100 ; Regularity = 7 ; Predictability = 8, What is the Trust Index?
Business Case 3: Customer Pain Point Analysis
How to quantify the importance
of customer pain points
reported?
Facts & Ideas
• Pain points are reported in 3 ways
• Phone complaints that result in a refund
• Phone complaints that do not result in a refund
• Internet reviews with low ratings
• Intuition suggests that the 3 types are in decreasing order of
importance
• Pain points that have an association of loss in customer trust index
have a special importance
Direct Solution
* alpha and beta are selected to be 2.0 and 1.5 to reflect the relative importance of the factor
they are multiplied with
Fuzzy Logic based Solution
• Input variables
• Customer Trust Index
• Drop in Customer Trust Index
• Phone complaint causing refund
• Phone complaint not causing refund
• Internet Review
• Output variable: Pain point score
• Multiplex before sending to fuzzy inference
• Evaluate per-review, defuzzify and take the sum
Results
Advantages using Fuzzy Logic
• Simplicity
• Ready for realtime applications (computationally lean)
• Human readability of rulebase
• Rulebase doesn’t have to be exhaustive
• Ability to explain the result
Blockchain AI
• Blockchains already use AI based agents as oracles
• Real “Blockchain AI” would be to use AI in consensus
• Fuzzy logic, because of its simplicity, is a good contender for that
Checkout my Fuzzy Logic library in Github
Questions

Contenu connexe

Similaire à Practical insights into fuzzy logic

Supervised learning
Supervised learningSupervised learning
Supervised learningJohnson Ubah
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer visionEran Shlomo
 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxajondaree
 
Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...
Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...
Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...Analytics India Magazine
 
Application of Machine Learning in Agriculture
Application of Machine  Learning in AgricultureApplication of Machine  Learning in Agriculture
Application of Machine Learning in AgricultureAman Vasisht
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxRusherGamer1
 
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법NAVER D2
 
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...Alok Singh
 
An introduction to machine learning and statistics
An introduction to machine learning and statisticsAn introduction to machine learning and statistics
An introduction to machine learning and statisticsSpotle.ai
 
Core Machine Learning Algorithms
Core Machine Learning AlgorithmsCore Machine Learning Algorithms
Core Machine Learning AlgorithmsPriyanka Kasture
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine LearningAyodele Odubela
 
Logical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementLogical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementTobias Trapp
 
Tolerance analysis for pm
Tolerance analysis for pmTolerance analysis for pm
Tolerance analysis for pmCherng-ywh Lee
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationBhaumik Parmar
 
[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx
[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx
[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptxOWAISSALAUDDINKHAN
 
Machine Learning and Deep Learning 4 dummies
Machine Learning and Deep Learning 4 dummies Machine Learning and Deep Learning 4 dummies
Machine Learning and Deep Learning 4 dummies Dori Waldman
 
Machine learning4dummies
Machine learning4dummiesMachine learning4dummies
Machine learning4dummiesMichael Winer
 
Introduction to machine learning and deep learning
Introduction to machine learning and deep learningIntroduction to machine learning and deep learning
Introduction to machine learning and deep learningShishir Choudhary
 

Similaire à Practical insights into fuzzy logic (20)

Supervised learning
Supervised learningSupervised learning
Supervised learning
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer vision
 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptx
 
Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...
Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...
Deciphering AI - Unlocking the Black Box of AIML with State-of-the-Art Techno...
 
Application of Machine Learning in Agriculture
Application of Machine  Learning in AgricultureApplication of Machine  Learning in Agriculture
Application of Machine Learning in Agriculture
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
 
TD Learning Webinar
TD Learning WebinarTD Learning Webinar
TD Learning Webinar
 
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
[D2 COMMUNITY] Spark User Group - 머신러닝 인공지능 기법
 
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
 
An introduction to machine learning and statistics
An introduction to machine learning and statisticsAn introduction to machine learning and statistics
An introduction to machine learning and statistics
 
Core Machine Learning Algorithms
Core Machine Learning AlgorithmsCore Machine Learning Algorithms
Core Machine Learning Algorithms
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine Learning
 
Logical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementLogical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules Management
 
Tolerance analysis for pm
Tolerance analysis for pmTolerance analysis for pm
Tolerance analysis for pm
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with Implementation
 
[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx
[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx
[GDSC-GNIOT] Google Cloud Study Jams Day 2- Cloud AI GenAI Overview.pptx
 
Machine Learning (Decisoion Trees)
Machine Learning (Decisoion Trees)Machine Learning (Decisoion Trees)
Machine Learning (Decisoion Trees)
 
Machine Learning and Deep Learning 4 dummies
Machine Learning and Deep Learning 4 dummies Machine Learning and Deep Learning 4 dummies
Machine Learning and Deep Learning 4 dummies
 
Machine learning4dummies
Machine learning4dummiesMachine learning4dummies
Machine learning4dummies
 
Introduction to machine learning and deep learning
Introduction to machine learning and deep learningIntroduction to machine learning and deep learning
Introduction to machine learning and deep learning
 

Plus de Dileepa Jayathilake

Adapting View Models as a Means For Sharing User Interface Code Between OS X ...
Adapting View Models as a Means For Sharing User Interface Code Between OS X ...Adapting View Models as a Means For Sharing User Interface Code Between OS X ...
Adapting View Models as a Means For Sharing User Interface Code Between OS X ...Dileepa Jayathilake
 
A framework for building web sites that are friendly to visually impaired
A framework for building web sites that are friendly to visually impairedA framework for building web sites that are friendly to visually impaired
A framework for building web sites that are friendly to visually impairedDileepa Jayathilake
 
Tips for writing effective business case studies
Tips for writing effective business case studiesTips for writing effective business case studies
Tips for writing effective business case studiesDileepa Jayathilake
 
A software monitoring framework for quality verification
A software monitoring framework for quality verificationA software monitoring framework for quality verification
A software monitoring framework for quality verificationDileepa Jayathilake
 
Research : A practical definition and a guideline
Research : A practical definition and a guidelineResearch : A practical definition and a guideline
Research : A practical definition and a guidelineDileepa Jayathilake
 
A Novel Mind Map Based Approach for Log Data Extraction
A Novel Mind Map Based Approach for Log Data ExtractionA Novel Mind Map Based Approach for Log Data Extraction
A Novel Mind Map Based Approach for Log Data ExtractionDileepa Jayathilake
 

Plus de Dileepa Jayathilake (7)

Adapting View Models as a Means For Sharing User Interface Code Between OS X ...
Adapting View Models as a Means For Sharing User Interface Code Between OS X ...Adapting View Models as a Means For Sharing User Interface Code Between OS X ...
Adapting View Models as a Means For Sharing User Interface Code Between OS X ...
 
A framework for building web sites that are friendly to visually impaired
A framework for building web sites that are friendly to visually impairedA framework for building web sites that are friendly to visually impaired
A framework for building web sites that are friendly to visually impaired
 
Tips for writing effective business case studies
Tips for writing effective business case studiesTips for writing effective business case studies
Tips for writing effective business case studies
 
Towards structured log analysis
Towards structured log analysisTowards structured log analysis
Towards structured log analysis
 
A software monitoring framework for quality verification
A software monitoring framework for quality verificationA software monitoring framework for quality verification
A software monitoring framework for quality verification
 
Research : A practical definition and a guideline
Research : A practical definition and a guidelineResearch : A practical definition and a guideline
Research : A practical definition and a guideline
 
A Novel Mind Map Based Approach for Log Data Extraction
A Novel Mind Map Based Approach for Log Data ExtractionA Novel Mind Map Based Approach for Log Data Extraction
A Novel Mind Map Based Approach for Log Data Extraction
 

Dernier

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Dernier (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Practical insights into fuzzy logic

  • 1. Practical Insights into Fuzzy Logic Dileepa Jayathilake Manager Research – 99X Technology Cofounder - Tracified
  • 2. A bit about me • Started with AI as an undergrad 16 years back • Developed Sinhala Text-to-Speech and Speech Recognition using Artificial Neural Networks and Hidden Markov Models • Authored the open source fuzzy logic library ALLib • Applied fuzzy logic in few industrial cases in Norway and China • More recently worked on Brain Wave Analysis • Current research interests: Blockchain, AI
  • 3. What is Fuzzy Logic? • AI technique to use when you want to combine human concepts (which are inherently of vague nature) with computing • Solves problems where crisp logic fails
  • 4. What is fuzzy logic good for today? Fuzzy Logic should be applied in cases where we have minimal knowledge about the process to be modelled - from a Fuzzy Logic Book from 90’s ?
  • 5. Business Case 1: Geo-fencing Sailor wants the app to wake him up if the anchor is broken and the boat is being dragged by wind
  • 6. Perfect World Solution Anchor Location Current Location Distance Moved (d) Did the boat move by more than a predefined distance?
  • 7. Location Readings are not perfect Anchor Location Current Location Location readings are received along with a tolerance T1 T2 Distance Moved (d) Actual movement can be anything between d – T1 – T2 and d + T1 + T2
  • 8. Tolerance can be Mild or Wild • High Accuracy Mode • Tolerance values are low • Readings are received frequently • Low Accuracy Mode • Tolerance values are high • Readings are received sparingly
  • 9. It’s important to know which mode we are in • In high accuracy mode • Happily ignore intermittent readings with high tolerance • Wait for the reading with best accuracy and treat it as a perfect reading • In low accuracy mode • Try to make use of every reading as only few readings are received • Apply a geometric correction
  • 10. Mode changes over time • Apply ‘mode recognition logic’ periodically • Lets say every 30 seconds • Then use the correct approach to find answer to the question “Should we ring the alarm?”
  • 11. Determining the mode using Crisp Logic Example: If BEST_TOLERANCE < 20m && READING_COUNT >= 15 Mode = HIGH_ACCURACY Else Mode = LOW_ACCURACY Now consider following 3 cases Best Tolerance Reading Count Case 1 18 15 Case 2 21 15 Case 3 18 13 Only Case 1 qualifies as High Accuracy mode while intuition suggests that all 3 cases must be same mode
  • 12. Alternative Can’t we write the logic in a form like: If BEST_TOLERANCE is LOW and READINGS_COUNT is VERY_HIGH Then there is a VERY_HIGH possibility that we are in HIGH_ACCURACY Mode Then we express our intuition on the case with further such rules: If BEST_TOLERANCE is MEDIUM and READINGS_COUNT is MORE_OR_LESS_HIGH Then there is a MEDIUM possibility that we are in HIGH_ACCURACY Mode If BEST_TOLERANCE is VERY_HIGH and READINGS_COUNT is LOW Then there is a LOW possibility that we are in HIGH_ACCURACY Mode
  • 13. Bridging Human World and Machine World Humans think in terms of concepts Machines think in terms of numbers Can we build a logic to bridge these two worlds?
  • 14. New form of the solution We express our intuition on the case as a Rulebase built out of concepts If BEST_TOLERANCE is LOW and READINGS_COUNT is VERY_HIGH Then there is a VERY_HIGH possibility that we are in HIGH_ACCURACY Mode If BEST_TOLERANCE is MEDIUM and READINGS_COUNT is MORE_OR_LESS_HIGH Then there is a MEDIUM possibility that we are in HIGH_ACCURACY Mode If BEST_TOLERANCE is VERY_HIGH and READINGS_COUNT is LOW Then there is a LOW possibility that we are in HIGH_ACCURACY Mode Then the machine solves the problem for us numerically! BEST_TOLERANCE = 12 && READINGS_COUNT = 18 Mode = HIGH_ACCURACY
  • 15. Possibility: The key to bridge the two worlds Probability Likelihood Proportion Possibility Feasibility Ease of Attainment
  • 16. Possibility Distribution Function Possibility Value X 1.0 0 Counterpart in the probability world is Probability Distribution Function
  • 17. Membership Function Possibility Value Low (Reading Count) 1.0 0 Counterpart in the probability world is Singular Value 2 15
  • 18. Meaning of X is LOW Possibility Value 1.0 0 2 15 • When we don’t have any more information about X, pdf for ‘X is LOW’ is the membership function of LOW • When we know X’s pdf, the pdf for ‘X is LOW’ is mf(LOW) o pdf(X)
  • 19. Fuzzy Inference Output pdf = ALSO{(input AND inputrulebase)IF-THEN outputrulebase}
  • 20. Solution Configuration Tolerance 1 = 8m ; Tolerance 2 = 15m ; Reading Count = 12 Is High Accuracy Mode?
  • 21. Fuzzification & Defuzzification Fuzzification Fuzzy Inference DeFuzzification Fuzzy Rulebase Tolerance 1 Tolerance 2 pdf pdf pdf [0 … 1]
  • 22. Challenges • Defining membership functions • Incompleteness of rulebase
  • 23. Business Case 2: Customer Trust Index How to quantify business value of a customer when you have sales data over a period? Quantity : Total amount a customer has spent Regularity : Frequency of Purchasing Consistency : Predictability of the customer
  • 24. Direct Solution Parameter High Score Low Score Quantity 10 1 Regularity 5 3 Predictability 8 2 E.g. Score(High Quantity, Low Regularity, Low Predictability) = 10 * 3 * 2 = 60
  • 25. Fuzzy Logic based Solution Define fuzzy input variables Quantity, Regularity and Predictability Define fuzzy sets for each input variable’s domain High_Value, Medium_Value, Somewhat_Low_Value, Insignificant_Value, …,Frequent, Regular, Occational, …, Recurring, Quasi-Predictable, Adhoc, … Define fuzzy output variable Trust Index Define fuzzy sets for output variable’s domain Regular_Customer, Experimentor, Endorser, Adhoc_Customer, … Define rulebase If (Quantity is Somewhat_Low_Value) AND (Regularity is Frequent) Then Trust Index is Experimentor If (Quantity is High_Value) AND (Regularity is Regular) AND (Predictability is Quasi-Predictable) Then Trust Index is Endorser Ask the question: If Quantity = 100 ; Regularity = 7 ; Predictability = 8, What is the Trust Index?
  • 26. Business Case 3: Customer Pain Point Analysis How to quantify the importance of customer pain points reported?
  • 27. Facts & Ideas • Pain points are reported in 3 ways • Phone complaints that result in a refund • Phone complaints that do not result in a refund • Internet reviews with low ratings • Intuition suggests that the 3 types are in decreasing order of importance • Pain points that have an association of loss in customer trust index have a special importance
  • 28.
  • 29. Direct Solution * alpha and beta are selected to be 2.0 and 1.5 to reflect the relative importance of the factor they are multiplied with
  • 30. Fuzzy Logic based Solution • Input variables • Customer Trust Index • Drop in Customer Trust Index • Phone complaint causing refund • Phone complaint not causing refund • Internet Review • Output variable: Pain point score • Multiplex before sending to fuzzy inference • Evaluate per-review, defuzzify and take the sum
  • 32. Advantages using Fuzzy Logic • Simplicity • Ready for realtime applications (computationally lean) • Human readability of rulebase • Rulebase doesn’t have to be exhaustive • Ability to explain the result
  • 33. Blockchain AI • Blockchains already use AI based agents as oracles • Real “Blockchain AI” would be to use AI in consensus • Fuzzy logic, because of its simplicity, is a good contender for that
  • 34. Checkout my Fuzzy Logic library in Github