1 / 30

Business Intelligence Technologies – Data Mining

Business Intelligence Technologies – Data Mining . Lecture 5 Personalization, k-Nearest Neighbors . Agenda. Personalization K-Nearest Neighbors Collaborative Filtering Case Discussion Software Demo. Personalization.

dara
Download Presentation

Business Intelligence Technologies – Data Mining

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Business Intelligence Technologies – Data Mining Lecture 5 Personalization, k-Nearest Neighbors

  2. Agenda • Personalization • K-Nearest Neighbors • Collaborative Filtering • Case Discussion • Software Demo

  3. Personalization Personalization/customization tailors certain offerings by providers to consumers based on knowledge about them with certain goals in mind. Personalized offerings Customer How?

  4. What is Currently Being Personalized • Personalized recommendations of products and services • e.g., recommend books, CDs and vacations; • Personalized products for individual consumers • e.g., custom-made CDs, Dell computers • Personalized emails • Personalized content • e.g., Yahoo’s personalized home page • Amazon’s channel management • Personalized (dynamic) prices

  5. Sample Automated E-mail

  6. Adjusting Personalization Strategy Measure Impact of Personalization Measuring Personalization Impact Feedback loop Delivery and Presentation Deliver Personalized Offerings Matchmaking Building Consumer Profiles Understand the Consumer Data Collection Personalization Process • Understand-Deliver-Measure Cycle

  7. Building Profiles from Data • Data Needed • Personal information, preferences & interests • Registration data, including demographic data • Customer ratings • Purchasing data • What was bought, when and where • Browsing & visitation data • Clickstream (Weblog files) • Building customer profiles • Demographic (e.g., name, address, age) • Behavioral (e.g., favorite type of book – adventure, largest transaction - $295) • Things learned from data

  8. Matchmaking Problem • Example: Large e-Commerce Site • 10M customers • 1M products • Question: How to match (target) the products to individual customers? What 10 books (out of 1M) should I show to Jane on her homepage? • Solution: To do matchmaking, use • customer profiles • various recommendation technologies

  9. Recommendation Technologies • Collaborative filtering • Find the closest customers and recommend what they buy • Content-based filtering • See what a customer has bought in the past, and use this information to predict what he would like in the future. e.g. Recommendation things that are similar to the things he bought before. • Rule-based approach • Identify business rules about what products should be recommended • Example: IF a customer fits a certain profile (e.g. male, age 25-35), THEN recommend a certain set of products.

  10. Agenda • Personalization • K-Nearest Neighbors • Collaborative Filtering • Case Discussion • Software Demo

  11. Nearest Neighbor Approaches • Based on the concept of similarity • Memory-Based Reasoning (MBR) • k Nearest Neighbor (KNN) • Collaborative Filtering (CF)

  12. K Nearest Neighbor (KNN) • K-Nearest Neighbor can be used for classification/prediction tasks. • Step 1: Using a chosen distance metric, compute the distance between the new example and all past examples. • Step 2: Choose the k past examples that are closest to the new example. • Step 3: Work out the predominant class of those k nearest neighbors - the predominant class is your prediction for the new example. i.e. classification is done by majority vote of the k nearest neighbors. For prediction problem with numeric target variable, the (weighted) average of the k nearest neighbors is used as the predicted target value.

  13. How do we determine our neighbors? -Distance Measure Revisited. • Each example is represented with a set of numerical attributes • “Closeness” is defined in terms of the Euclidean distance between two examples. • The Euclidean distance between X=(x1, x2, x3,…xn) and Y =(y1,y2, y3,…yn) is defined as: • Distance (John, Rachel)=sqrt [(35-41)2+(95K-215K)2 +(3-2)2] John: Age=35 Income=95K No. of credit cards=3 Rachel: Age=41 Income=215K No. of credit cards=2

  14. K-Nearest Neighbor Classifier Example : 3-Nearest Neighbors

  15. K-Nearest Neighbor Classifier Example Yes (2/3)

  16. Some Issues with Euclidian Distance • Scaling of values • Since each numeric attribute may be measured in different units, they should be standardized. • Weighting of attributes: • Manual weighting: Weights may be suggested by experts • Automatic weighting: Weights may be computed based on discriminatory power or other statistics. (e.g. in SAS, weighted dimension is based on the correlation to the target variable.) • Treatment of categorical variables • Various ways of assigning distance between categories are possible.

  17. Dealing with Categorical Values • For categorical values, we can to convert them to numeric values. • We might treat ‘being in class A’ as ‘1’, and ‘not in class A’ as 0. Therefore, two items in the same class have distance 0 for that attribute, and two items in different classes have distance 1 for that attribute. For example: • Take the bridge attributes: (deck type, purpose) Take the bridges: Bridge 1 = (concrete, auto) • Bridge 2 = (steel, railway) • Bridge 3 = (concrete, railway) • We could compute distances as: • d(Bridge1,Bridge2) = 1 + 1 = 2 • d(Bridge2,Bridge3) = 1 + 0 = 1 • d(Bridge1,Bridge3) = 0 + 1 = 1 • Again, some form of weighting for attributes of different importance may be useful.

  18. Dealing with Categorical Values • We might also construct aggregation hierarchies, so that categories far away from each other conceptually are given higher distances. Deck Concrete deck Steel deck Pre-cast deck Cast-at-site deck • Using this hierarchy, we might regard the distance between pre-cast and cast-at-site as 1 (they have a common parent), while the distance between pre-cast and steel could be 2 (they have a common grandparent). The distance between concrete and steel would be 1 (they have a common parent).

  19. How to Decided K? • Assume a new example X (at the center of the circles below). Notice that: • With a 3-Nearest Neighbor classifier (inner circle), X is assigned to the majority Class B, whereas • With an 11-Nearest Neighbor classifier (outer circle), X is assigned to the majority Class A. • Can use validation data set to decide k. Attribute B Class A X Class B X Attribute A

  20. Strengths of K-Nearest Neighbor • Often work well for classes that are hard to separate using parametric methods or the splits used by decision trees. • Simple to implement and use • Comprehensible – easy to explain prediction • Robust to noisy data by averaging k-nearest neighbors. • Some appealing applications (e.g. personalization) Attribute B Class A Class B Class C Class D Attribute A

  21. Problems with K Nearest Neighbor (KNN) • How to choose k ? Do we use 1 nearest neighbor, 10 nearest neighbors, 50 nearest neighbors? • Computational cost: For a large database, we’d have to compute the distance between the new example and every old example, and then sort by distance, which can be very time-consuming. Possible resolutions are: • sampling: store only a sample of the historic data so that you have fewer distances to compute.

  22. Applications of MBR • Medicine / 911: Find which diagnosis was made for similar symptoms in the past, and adapt treatment appropriately • Customer Support (HelpDesk): Find which solution was proposed for similar problems in the past, and adapt appropriately (e.g. Compaq’s SMART/QUICKSOURCE system) • Engineering / Construction: Find what costing or design was made for projects with similar requirements in the past, and adapt appropriately • Law (Legal Advice): Find what judgment was made for similar cases in the past, and adapt appropriately • Audit and Consulting Engagements: find similar past projects • Insurance Claims Settlement: find similar claims in the past • Real estate: Property price appraisal based on previous sales

  23. Agenda • Personalization • K-Nearest Neighbors • Collaborative Filtering • Case Discussion • Software Demo

  24. Collaborative Filtering: Finding the like-minded people • One seeks recommendations about movies, restaurants, books etc. from people with similar tastes • Automate the process of "word-of-mouth" by which people recommend products or services to one another. • CF is a variant of MBR particularly well suited to personalized recommendations

  25. Collaborative Filtering • Starts with a history of people’s personal preferences • Uses a distance function – people who like the same things are “close” • Uses “votes” which are weighted by distances, so close neighbor votes count more

  26. Collaborative filtering • Consumers’ preferences are registered David is seeking recommendations on restaurants . Using a similarity metric, the similarity between another person and David is calculated based on their preferences (i.e., restaurant ratings). Their (weighted) average ratings for any given restaurant is computed, and restaurants with a high average score are recommended to David.

  27. Collaborative filtering • Distance • David and Don: sqrt[(5-1)2+(1-3)2+(6-2)2]=6 • David and Rachel: sqrt[(1-1)2+(4-3)2+(2-2)2]=1 • Weighted Score • 6*(1/7) + 3*(6/7) = 3.4 • 2*(1/7) + 5*(6/7) = 4.6 • Ranking • Cosi > University Cafe

  28. Collaborative Filtering: Drawback for sellers • Need real time recommendation • Scale – millions of customers, thousands of items • Works well only once a "critical mass" of preference has been obtained • Need a very large number of consumers to express their preferences about a relatively large number of products. • Consumer input is difficult to get • Solution: identify preferences that are implicit in people's actions • For example, people who order a book implicitly express their preference for the book they buy over other books • Works well but results are not as good as the results achieved using explicit ratings.

  29. Example: Implicit rating

  30. Case Discussion • Firefly • What are the pros and cons of collaborative filtering, content-based systems and rule-based systems for recommendations? What industries/applications is each technique good for? • How are implicit ratings learned? What are the limitations of implicit ratings? How can they be improved? • Polyphonic HMI • How is the same technique used for music recommendation and hit-song prediction? • How can Hit Song Science benefit the record labels, producers and the unsigned artists? • Can KNN be used for hit-song prediction? How? • General Discussion Question: • How to evaluate a personalization system?

More Related