Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:00:55+00:00 2026-06-13T13:00:55+00:00

I want to do a sort of user-user collaborative filtering wherein the users in

  • 0

I want to do a sort of user-user collaborative filtering wherein the users in the user-item matrix are a selected part of whole users in the database. These selected users are refreshed regularly with newly selected users preferences. New users shouldn’t be added to the matrix. For a new user, based on his preferences we need to recommend items from the user-item matrix (which has only a part of users which are selected). I do not want to add the new anonymous users to the matrix.

Explored in Mahout, but need some help there.
The Recommender Class in Mahout has recommend(…) method which takes the user_id as argument. This is not which I want. The method should accept the preferences and based on the model , items should be recommended. How to do it in Mahout?? Can we use PlusAnonymousUserDataModel ??

If not mahout, what other tools can accomplish this…

The code which I used with PlusAnonymousUserDataModel which is not giving any recommendations for the user who has recommendations with normal usage..

    DataModel model = new GenericBooleanPrefDataModel( GenericBooleanPrefDataModel.toDataMap( new FileDataModel(f)));
    TanimotoCoefficientSimilarity similarity = new TanimotoCoefficientSimilarity(model);
    UserNeighborhood neighborhood = new NearestNUserNeighborhood(1000, similarity, model);
    new_user_preferences = { ... } // new user items..
    DataModel plusmodel = new PlusAnonymousUserDataModel(model);
    PreferenceArray anonymousPrefs = new GenericUserPreferenceArray(new_user_preference.length);
    anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);
    for(int i = 0;i < new_user_preference.length;i++)
    {
      anonymousPrefs.setItemID(i, new_user_preference[i]);
    }
    PlusAnonymousUserDataModel plusAnonymousModel = (PlusAnonymousUserDataModel) plusmodel;
    Recommender recommender1 = new GenericBooleanPrefUserBasedRecommender(model, neighborhood, similarity);
    plusAnonymousModel.setTempPrefs(anonymousPrefs);
    List<RecommendedItem> recommendations1 = recommender1.recommend(plusAnonymousModel.TEMP_USER_ID, 10);

Is there any problem with the code??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:00:56+00:00Added an answer on June 13, 2026 at 1:00 pm

    sravan_kumar, if you replace model with plusAnonymousModel in 3 places:
    TanimotoCoefficientSimilarity similarity = new TanimotoCoefficientSimilarity(plusAnonymousModel);
    UserNeighborhood neighborhood = new NearestNUserNeighborhood(1000, similarity, plusAnonymousModel);
    Recommender recommender1 = new GenericBooleanPrefUserBasedRecommender(plusAnonymousModel, neighborhood, similarity);

    and initialize plusAnonymousModel right, just after initializing model:
    PlusAnonymousUserDataModel plusAnonymousModel = new PlusAnonymousUserDataModel(model);
    (there is no need in plusmodel variable, as you use it)
    , you will get the desired results!

    Also, change GenericUserPreferenceArray to BooleanUserPreferenceArray 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to sort list items by their priority, which the user types in,
I want to create an Activity which shows a sort of menu a user
I want to sort the items that have been previously selected with checkboxes. If
i want to sort dictionary based upon value of each dictioanry item.but if i
I want to sort by postcode, if user type in: L25 The result may
I want to administrate my User-entities in a grid. I want to sort them
I want to sort a list by each item's digit. Example: myCmpItem = '511'
I have the table which list some details from database.I want to sort the
I want to sort list of strings with respect to user language preference. I
When the user does a column sort in my DataGrid , I want all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.