This document discusses practical applications of fuzzy logic and provides examples of how fuzzy logic can be used to solve problems involving human concepts that are vague in nature. It describes two business case examples where fuzzy logic is used to determine a boat's location mode and a customer's trust index. The key benefits of fuzzy logic mentioned are that it provides a simple way to bridge human and machine reasoning by using linguistic rules and possibility distributions rather than crisp logic.
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
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
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)
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
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