I have web UI event data representing various uses case scenarios with multiple data entry points. I would like to build some sort of DBSCAN, K-means Clustering solution to come up with user behavior segmentation so events can be split and grouped into different use case transactions.

GUID, Time, User_ID, EventName
1, 18:16:12:23,User1, Search_page
2, 18:16:12:25,User1, Chose_Product_From_Search_Results
3, 18:16:12:33,User1, Enter_Quantity_Of_Chosen_product
4, 18:16:12:37,User1, Init_ShoppingCart_checkout
5, 18:16:12:39,User1, View_Stored_Address_And_Billing_Details
6, 18:16:12:41,User1, Process_Payment
7, 18:16:12:45,User1, Show_order_confirmation_Invoice_PDF_download
8, 18:17:12:23,User2, Init_ShoppingCart_checkout
9, 18:17:12:25,User2, View_Stored_Address_And_Billing_Details
10, 18:17:14:33,User2, Verify_Details_Before_Order_Confirmation
11, 18:19:17:10,User2, View_Previous_Orders
12, 18:19:34:39,User2, View_Product_Detail
13, 18:21:12:23,User2, Search_page
14, 18:21:30:25,User2, Chose_Product_From_Search_Results
15, 18:24:12:23,User2, Access_WishList
16, 18:24:18:25,User2, View_Product
17, 18:24:22:33,User2, Enter_Quantity_Of_Chosen_product
18, 18:24:28:37,User2, Init_ShoppingCart_checkout
19, 18:24:43:39,User2, View_Stored_Address_And_Billing_Details
20, 18:24:48:45,User2, Process_Payment
21, 18:24:54:47,User2, Show_order_confirmation_Invoice_PDF_download

In above listed events 'User1' started with search page and went all the way till payment(GUID 1 to 8), this is considered as one use case transaction. 'User2' tried different things (by clicking on different links) without completing any single use case transaction. he invoked all below use cases with out completion. how to identify different use cases user invoked in given time frame? for 'User2', i would like to identify all below use case transactions from above event stream.

A. View shopping cart directly without browsing products (GUID 8 to 10)
B. View Previous Orders (GUID 11 to 12)
C. search for product (GUID 13 to 14)
D. view wish list, proceed to shopping cart and confirmation (GUID 15 to 21)

Any guidance is highly appreciated.


No clustering algorithm will "just" work on this.

Either they need continuous variables (e.g., k-means, GMM) or they require a good distance or similarity measure (e.g., DBSCAN, HAC, PAM). Right now, you have neither.

So you need to:

  1. Preprocess your data
  2. Extract features
  3. Define a similarity
  4. Cluster

You can't begin at the end...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.