/*
* 这段程序对于基于欧式距离定义相似度的评估
* */
package byuser;
import java.io.File;
import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.eval.RecommenderBuilder;
import org.apache.mahout.cf.taste.eval.RecommenderEvaluator;
import org.apache.mahout.cf.taste.impl.eval.AverageAbsoluteDifferenceRecommenderEvaluator;
import org.apache.mahout.cf.taste.impl.neighborhood.NearestNUserNeighborhood;
import org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender;
import org.apache.mahout.cf.taste.impl.similarity.EuclideanDistanceSimilarity;
import org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity;
import org.apache.mahout.cf.taste.model.DataModel;
import org.apache.mahout.cf.taste.neighborhood.UserNeighbor
基于欧式距离定义相似度推荐算法的评估
最新推荐文章于 2023-04-15 22:24:26 发布
博客对比了基于欧式距离和皮尔逊算法在推荐系统中定义相似度的效果,结果显示欧式距离算法在评估中表现出更优的性能。
摘要由CSDN通过智能技术生成