Collaborative Filtering for Java

    技术2022-05-11  16

    Taste is a flexible, fast collaborative filtering engine for Java. The engine takes users' preferences for items ("tastes") and returns estimated preferences for other items. For example, a site that sells books or CDs could easily use Taste to figure out, from past purchase data, which CDs a customer might be interested in listening to.

    Taste provides a rich set of components from which you can construct a customized recommender system from a selection of algorithms. Taste is designed to be enterprise-ready; it's designed for performance, scalability and flexibility. It supports a standard EJB interface for J2EE-based applications, but Taste is not just for Java; it can be run as an external server which exposes recommendation logic to your application via web services and HTTP.

    Top-level packages define the Taste interfaces to these key abstractions:

    DataModel PreferenceTransform UserCorrelation and ItemCorrelation UserNeighborhood Recommender

    Subpackages of comp.planetj.taste.impl hold implementations of these interfaces. These are the pieces from which you will build your own recommendation engine. That's it! For the academically inclined, Taste supports both memory-based and item-based recommender systems, slope one recommenders, and a couple other experimental implementations. It does not currently support model-based recommenders.

    Architecture

    This diagram shows the relationship between various Taste components in a user-based recommender. An item-based recommender system is similar except that there are no PreferenceInferrers or Neighborhood algorithms involved.

    Recommender

    A Recommender is the core abstraction in Taste. Given a DataModel, it can produce recommendations. Applications will most likely use the GenericUserBasedRecommender implementation or GenericItemBasedRecommender, possibly decorated by CachingRecommender.

    DataModel

    A DataModel is the interface to information about user preferences. An implementation might draw this data from any source, but a database is the most likely source. Taste provides MySQLJDBCDataModel to access preference data from a database via JDBC, though many applications will want to write their own. Taste also provides a FileDataModel.

    Along with DataModel, Taste uses the User, Item and Preference abstractions to represent the users, items, and preferences for those items in the recommendation engine. Custom DataModel implementations would return implementations of these interfaces that are appropriate to the application - maybe an OnlineUser implementation that represents an online store user, and a BookItem implementation representing a book.

    PreferenceTransforms

    A PreferenceTransform alters preference values in some way, possibly normalizing or exaggerating them. These may be attached to a DataModel.

    UserCorrelation, ItemCorrelation

    A UserCorrelation defines a notion of similarity between two Users. This is a crucial part of a recommendation engine. These are attached to a Neighborhood implementation. ItemCorrelations are analagous, but find similarity between Items.

    UserNeighborhood

    In a user-based recommender, recommendations are produced by finding a "neighborhood" of similar users near a given user. A UserNeighborhood defines a means of determining that neighborhood — for example, nearest 10 users. Implementations typically need a UserCorrelation to operate.

     

    最新回复(0)