Bouakkez Anouar
Bouakkez Anouar

Reputation: 89

what is the best maching learning algorithm in my situation

Assume that a tourist has no idea about the city to visit , I want to recommend top 10 cities based on his features about the city (budgetToTravel , isCoastel , isHitorical , withFamily, etc ...). My dataset contains features for every city for exemple :

  1. Venice Italy (budgetToTravel='5000' , isCoastel=1 , isHistorical =1 , withFamily=1,...)
  2. Berlin Germany (BudgetToTravel='6000' ,isHistorical=1, isCoastel =0 , withFamily=1 ,...).

I want to know the best algorithm of machine learning to recommend the top 10 cities to visit based on the features of a tourist .

Upvotes: 0

Views: 105

Answers (2)

singhV
singhV

Reputation: 157

You can use (unsupervised) clustering algorithm like Hierarchical Clustering or K-Means Clustering to have clusters of 10 and then you can match the person (tourist) features with the clusters.

Upvotes: 0

Platon
Platon

Reputation: 84

As stated Pierre S. you can start withKNearestNeigbours

This algorithm will allow you do exactly what you want by doing:

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

Upvotes: 1

Related Questions