mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Musselman <andrew.mussel...@gmail.com>
Subject Re: Tanimoto Coefficient
Date Wed, 17 Dec 2014 18:47:47 GMT
I've never used it in production but there's no reason not to try it out,
and there's nothing stopping you from applying it to users as well as items.

On Wed, Dec 17, 2014 at 1:09 AM, ARROYO MANCEBO David <
david.arroyo@altran.com> wrote:
>
> Hi mahouters,
>
> Is useful and acceptable the tanimoto coefficient for an user similarity
> or only for item similarity ?
>
>        public static void main(String[] args) {
>              try {
>                     DataModel model = new FileDataModel(new
> File("data/dataset.csv"));
>                     UserSimilarity similarity = new
> TanimotoCoefficientSimilarity(model);
>                     UserNeighborhood neighborhood = new
> ThresholdUserNeighborhood(0.1, similarity, model);
>                     UserBasedRecommender recommender = new
> GenericUserBasedRecommender(model, neighborhood, similarity);
>                     List<RecommendedItem> recommendations =
> recommender.recommend(2, 3);
>                     for (RecommendedItem recommendation : recommendations)
> {
>                       System.out.println(recommendation);
>                     }
>              } catch (IOException e) {
>                     e.printStackTrace();
>              } catch (TasteException e) {
>                     e.printStackTrace();
>              }
>        }
>
> Thanks.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message