【问题标题】:what is the best maching learning algorithm in my situation在我的情况下,最好的机器学习算法是什么
【发布时间】:2019-02-27 06:57:45
【问题描述】:
假设一个游客不知道要参观的城市,我想根据他对城市的特征(budgetToTravel、isCoastel、isHitorical、withFamily 等)推荐 top 10 城市... )。
例如,我的数据集包含每个城市的特征:
- 意大利威尼斯
(budgetToTravel='5000' , isCoastel=1 , isHistorical =1 , withFamily=1,...)
- 德国柏林 (BudgetToTravel='6000' ,isHistorical=1, isCoastel =0 , withFamily=1 ,...)。
我想知道最好的机器学习算法,根据游客的特征推荐前 10 个旅游城市。
【问题讨论】:
标签:
machine-learning
artificial-intelligence
data-science
【解决方案1】:
正如 Pierre S. 所说,您可以从KNearestNeigbours开始
这个算法可以让你做你想做的事:
n_cities_to_recommend = 10
neigh = NearestNeighbors(2, radius=1.0) # you need to play with radius here o scale your data to [0, 1] with [scaler][2]
neigh.fit(cities)
user_input = [budgetToTravel, isCoastel, isHistorical, withFamily, ...]
neigh.kneighbors([user_input], n_cities_to_recommend, return_distance=False) # this will return you closest entities id's from cities
【解决方案2】:
您可以使用(无监督)聚类算法(如分层聚类或 K-Means 聚类)来生成 10 个聚类,然后您可以将人(游客)特征与聚类进行匹配。