RE: Tanimoto Coefficient

2014-12-19 Thread ARROYO MANCEBO David
Thanks, I will use it in my solution :)

-Mensaje original-
De: Andrew Musselman [mailto:andrew.mussel...@gmail.com] 
Enviado el: miƩrcoles, 17 de diciembre de 2014 19:48
Para: user@mahout.apache.org
Asunto: Re: Tanimoto Coefficient

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.arr...@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 recommendations = 
> recommender.recommend(2, 3);
> for (RecommendedItem recommendation : 
> recommendations) {
>   System.out.println(recommendation);
> }
>  } catch (IOException e) {
> e.printStackTrace();
>  } catch (TasteException e) {
> e.printStackTrace();
>  }
>}
>
> Thanks.
>


Re: Tanimoto Coefficient

2014-12-17 Thread Andrew Musselman
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.arr...@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 recommendations =
> recommender.recommend(2, 3);
> for (RecommendedItem recommendation : recommendations)
> {
>   System.out.println(recommendation);
> }
>  } catch (IOException e) {
> e.printStackTrace();
>  } catch (TasteException e) {
> e.printStackTrace();
>  }
>}
>
> Thanks.
>