FeApResFeApRes Supervisor: Mr. Le Thanh Quang
OutlineOutline I. Group Introduction II. Capstone Project Introduction III. Software Project Plan IV. Software Design Description V. Demo VI. Software Testing I. Group Introduction II. Capstone Project Introduction III. Software Project Plan IV. Software Design Description V. Demo VI. Software Testing
I.Group Introduction PMTester/QA DEV team Supervisor Mr. Le Thanh Quang
II.Capstone Project Introduction L ove P assion
II.Capstone Project Introduction Cook Serve Decorate
II.Capstone Project Introduction Cook Serve Decorate Restaurant ➣ Interesting but sophisticated business ➣ Tons of stuff to face with
II.Capstone Project Introduction User requirements must be thoroughly analyzed
II.Capstone Project Introduction Limitations of existing system: Non user-friendly interface Non VIP customer management supporting Non data analyzing tool
User Requirements Customer Waiter/Waitress Cashier Manager Accountant FeApRes The system has the domain functions like other common restaurant management systems. Smart card to support management. Tool to analyze transaction data for meaningful conclusion.
Requirement Specification Problem: Problem QU Ả N LÝ KHÁCH HÀNG TÍCH Đ I Ể M GI Ả M GIÁ PHÂN TÍCH DỮ LIỆU TÀI S Ả N
Requirement Specification Scope: TÍCH Đ I Ể M GI Ả M GIÁ PHÂN TÍCH DỮ LIỆU QU Ả N LÝ KHÁCH HÀNG TÀI S Ả N
Cook Serve Decorate Requirement Specification Using Felica card and Apriori algorithm in restaurant management Solution
II.Capstone Project Introduction Felica: contactless smart card system Apriori algorithm: a classic algorithm for learning association rules VIP customer management with card Data mining
III.Project Plan DEVELOPMENT MODEL
Development Model Reasons Time constraint On time, accepted quality Specific phases Equal weight: coding, testing
III.Project Plan
Team Working Online Offline
IV.Software Design Descriptions
Architecture Design
Component design
Database Design
Felica Card Felica has high speed communication Felica has high security Felica is good at anti-collision
Outline I. Device II. Communication Protocol III. File System IV. Commands I. Device II. Communication Protocol III. File System IV. Commands
Device Reader / WriterFelica Card Pasori (RC – S600)RC – S885
Communication Protocol Physical layer defines the physical and electrical characteristics of data transfer Data link layer defines the data transfer method and the error detection scheme. Application layer defines the specifications and functions of data strings to be handled as commands. Physical layer defines the physical and electrical characteristics of data transfer Data link layer defines the data transfer method and the error detection scheme. Application layer defines the specifications and functions of data strings to be handled as commands.
Communication Protocol Application layer Command Package Response Package Application layer Command Package Response Package
File System
Commands
Demo Using Felica Card in Restaurant Management
Apriori Algorithms Target: Decision-making Making strategic plan E.g.: Preparing inventory Suggesting customer Managing menu (add, remove dish when needed) Managing human resource.
Outline 1. Association Rules Overview 2. Apriori Overview 3. Apriori Algorithms 4. Improvement 4.1. Segmental Values (Mờ hóa dữ liệu) 4.2. Get Support (Speed up algorithms) 4.3. Weight Rules (Find important rules) 1. Association Rules Overview 2. Apriori Overview 3. Apriori Algorithms 4. Improvement 4.1. Segmental Values (Mờ hóa dữ liệu) 4.2. Get Support (Speed up algorithms) 4.3. Weight Rules (Find important rules)
1. Association Rules Overview Association Rule : Relations between variables in large databases. E.g. (Sea food) => (Wine) Algorithms for finding association rules: o Apriori algorithm o Eclat algorithm o FP-growth algorithm o One-attribute-rule o Zero-attribute-rule Association Rule : Relations between variables in large databases. E.g. (Sea food) => (Wine) Algorithms for finding association rules: o Apriori algorithm o Eclat algorithm o FP-growth algorithm o One-attribute-rule o Zero-attribute-rule
2. Apriori Overview Best-known algorithm to mine association rules Advantages o Find all rules o Simple Disadvantages o Suffer from a number of inefficiencies or trade-offs o Operate in binary data only Best-known algorithm to mine association rules Advantages o Find all rules o Simple Disadvantages o Suffer from a number of inefficiencies or trade-offs o Operate in binary data only
3. Apriori Algorithms Step 1: Find all frequent itemsets: Get frequent items: Items whose occurrence in database is greater than or equal to the min support. Get frequent itemsets: Generate candidates from frequent items. Use the candidate to find the frequent itemsets. Repeat until there are no new candidates. Step 1: Find all frequent itemsets: Get frequent items: Items whose occurrence in database is greater than or equal to the min support. Get frequent itemsets: Generate candidates from frequent items. Use the candidate to find the frequent itemsets. Repeat until there are no new candidates.
3. Apriori Algorithms Step 2: Generate strong association rules from frequent item sets Rules which satisfy the min support and min confidence. Step 2: Generate strong association rules from frequent item sets Rules which satisfy the min support and min confidence.
3. Apriori Algorithms
3.1. Apriori Algorithms : Step1 Transaction ACD BCE ABCE BE L1-ItemsetSupport {A}2 {B}3 {C}3 {E}3 Min Support = 50 % Min Confidence = 80% L2-ItemsetSupport {AC}2 {BC}2 {BE}3 {CE}2 Self-Join Check Support ItemSupport {A}2 {B}3 {C}3 {D}1 {E}3 Check Support ItemSupport {AB}1 {AC}2 {AE}1 {BC}2 {BE}3 {CE}2
3.1. Apriori Algorithms : Step1 Self -Join Check Support L2 L3 All subsets of frequent Items must be frequent. {ABCDEF} must combine with itemsets like {ABCDEG} ItemSupport {BCE}2 L2-ItemsetSupport {AC}2 {BC}2 {BE}3 {CE}2 L3-ItemsetSupport {BCE}2
3.1.Apriori Algorithms : Step1 Frequent ItemsSupport {A}2 {B}3 {C}3 {E}3 {AC}2 {BC}2 {BE}3 {CE}2 {BCE}2
3.2.Apriori Algorithms : Step2
4. IMPROVEMENT 4.1. Segmental Values (Mờ hóa dữ liệu) 4.2. Get Support (Speed up algorithms) 4.3. Weight Rules (Find important rules) 4.1. Segmental Values (Mờ hóa dữ liệu) 4.2. Get Support (Speed up algorithms) 4.3. Weight Rules (Find important rules)
4.1.Segmental Values Major disadvantage: binary database. -> Convert conventional database to binary database Value Types: o Category values o Continuous values (E.g. Age, money, ….) Major disadvantage: binary database. -> Convert conventional database to binary database Value Types: o Category values o Continuous values (E.g. Age, money, ….)
4.1.Segmental Values Fuzzy Set Triangle Function Fuzzy Set Triangle Function 0 1 a b c
4.1.Segmental Values Fuzzy Set Trapezoid Function Fuzzy Set Trapezoid Function 0 1 ab cd
4.1. Segmental Values Bill values (0-> max: integer) Low= F1(x,0,0,500,600) (red line) Medium = F2(x,600,500,2000,2500) (blue line) High = F3(x,2000,2500,MaxInt, MaxInt) (yellow line) MinWT = 0.4 Bill values (0-> max: integer) Low= F1(x,0,0,500,600) (red line) Medium = F2(x,600,500,2000,2500) (blue line) High = F3(x,2000,2500,MaxInt, MaxInt) (yellow line) MinWT = 0.4 Example : if F1(2200) = 0; F2(F1(2200) = 0.5; F3(2200) = 0.6) => 2200k Bill of 2200 is considered as both Middle and High
4.2. Get Support This procedure is the most time consuming part in the algorithms. L1-ItemsetSupport {A}2 {B}3 {C}3 {E}3 L2-ItemsetSupport {AC}2 {BC}2 {BE}3 {CE}2 ItemSupport {AB}1 {AC}2 {AE}1 {BC}2 {BE}3 {CE}2 Join Check Support ItemSupport {A}2 {B}3 {C}3 {D}1 {E}3 Check Support L1 L2
4.2. Get Support Transaction ACDE BCE ABCE BCE AB SETElements A{1,3,5} B{2,3,4,5} C{1,2,3,4} D{1} E{1,2,3,4} Need algorithms to calculate intersection of two sets (HASH SET)
4.3. Weight Rules Rule: (Vip card = Yes & Time = Afternoon) => Bill Amount = High Some components are more interesting than others E.g.: Bill Amount => Each component is weighted. Importance of rule A=>B is Rule: (Vip card = Yes & Time = Afternoon) => Bill Amount = High Some components are more interesting than others E.g.: Bill Amount => Each component is weighted. Importance of rule A=>B is
Demo Using Apriori Algorithm in Restaurant Management
VI. Testing Bases The system including 5 components as: - Authentication - Accountant - Manager - Cashier - Apriori Algorithm The stages of testing: - Unit Test - Integration Test & System Test - User Acceptance Test Final SRS Detail Design
Test Plan Create test plan Create and update test cases Execute test
Test Execution 1. Features to be tested Authentication Manager Cashier Accountant Apriori algorithm 2. Features not to tested None
Test Data Problem with real test data 1.Functionality testing: Create sample data in logic (about 10 records for each table) and execute test. 2. Performance testing: Using SQL query to generate test data. They’re created randomly.
Algorithm Testing Algorithm’s speed: -Hundreds of records (Order and Bill): ~ 3seconds -Thousands of records : ~ 5seconds records : ~ 7,8 seconds
Test Result
Demo Other Business Functions in Restaurant Management
Future Features 1. Use Felica as the smart card -Check-in and check-out of staff management -Customer and supplier management 2. Complete all business functions of the system -Inventory management -Accounting -Online reservation
Future Features 3. Improve Apriori algorithm 4. Build restaurant system including hardware and software support
Lessons Learned Communication Working in group Felica technology Apriori algorithm Project management Restaurant business domain
FeApRes