## org.apache.mahout.cf.taste.eval
Interface RelevantItemsDataSplitter

All Known Implementing Classes:
  GenericRelevantItemsDataSplitter

    public interface RelevantItemsDataSplitter

Implementations of this interface determine the items that are considered relevant, and splits data into a training and test subset, for purposes of precision/recall tests as implemented by implementations of `RecommenderIRStatsEvaluator`.

Method Summary
`FastIDSet` `getRelevantItemsIDs(long userID, int at, double relevanceThreshold, DataModel dataModel)` During testing, relevant items are removed from a particular users' preferences, and a model is build using this user's other preferences and all other users.
`void` `processOtherUser(long userID, FastIDSet relevantItemIDs, FastByIDMap<PreferenceArray> trainingUsers, long otherUserID, DataModel dataModel)` Adds a single user and all their preferences to the training model.

Method Detail

### getRelevantItemsIDs

    FastIDSet getRelevantItemsIDs(long userID,
                                  int at,
                                  double relevanceThreshold,
                                  DataModel dataModel)
                                  throws TasteException

  During testing, relevant items are removed from a particular users' preferences, and a model is build using this user's other preferences and all other users.

  Parameters:
    `at` - Maximum number of items to be removed
    `relevanceThreshold` - Minimum strength of preference for an item to be considered relevant
  Returns:
    IDs of relevant items
  Throws:
    `TasteException`

### processOtherUser

    void processOtherUser(long userID,
                          FastIDSet relevantItemIDs,
                          FastByIDMap<PreferenceArray> trainingUsers,
                          long otherUserID,
                          DataModel dataModel)
                          throws TasteException

  Adds a single user and all their preferences to the training model.

  Parameters:
    `userID` - ID of user whose preferences we are trying to predict
    `relevantItemIDs` - IDs of items considered relevant to that user
    `trainingUsers` - the database of training preferences to which we will append the ones for otherUserID.
    `otherUserID` - for whom we are adding preferences to the training model
  Throws:
    `TasteException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.