0

I could not come up with an algorithm for the scenario I have.

Problem I have: I have a movie name which is associated with features like emotions,imdb rating,user rating etc.This is how it looks

     MovieName | Rating | Polarity | Action | Adventure....
     ------------------------------------------------------

I want to plot all the fields associated with the movie(rating,polarity..) in a plane with dimension equals to the number of features. I want to do this for all the rows or the instances I have. And whenever the new response I get like new movie name with same fields, I want to plot it too and also wants to get Movie Name of K closest match. Say new movie that user inputs is The Shawshank redemption, so I want to plot it with other instances and wants to get 5 closest match (Movie name of the match).

Any leads appreciated.

Pankaj Mishra
  • 550
  • 6
  • 18
  • Maybe the k-nearest neighbors algorithm could help? https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm http://machinelearningmastery.com/tutorial-to-implement-k-nearest-neighbors-in-python-from-scratch/ http://scikit-learn.org/stable/modules/neighbors.html https://kevinzakka.github.io/2016/07/13/k-nearest-neighbor/ – BoboDarph Jul 18 '17 at 14:24
  • @BoboDarph Thanks mate. I used movie name as target and all other as features, this served the purpose. If you could help me, can you tell me how in sklearn api I can get more than one prediction or closest match ? I am getting only one output i.e predicted value, how can I get top 5 or so. Thanks again. – Pankaj Mishra Jul 18 '17 at 17:30
  • Doesnt nearestneighbors.kneighbors do exactly what you need? http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn-neighbors-nearestneighbors – BoboDarph Jul 19 '17 at 06:36

0 Answers0