45 thoughts on “Coding Challenge #70.1: Nearest Neighbors Recommendation Engine – Part 1

  1. 19:19 You could destructure array and object like –

    const [name,timestamp,…rest] = titles;


  2. Can anyone help here ,
    Let's assume , we have 154 sonnets .. how can I built a recommendation system to show related sonnets?(python)

  3. You should make a working rubik's cube in p5.js! You could make it so you can change the size of the rubiks cube (3x3x3,4x4x4,etc.) I have been trying to make this but with no luck.

  4. By far the EASIEST way to remove a property from a JSON

  5. For anyone who can't find movies.json, there ya go

  6. Instead of:

    var titles = Object.keys(ratings1);

    var i = titles.indexOf('name');

    titles.splice(i, 1);

    var j = titles.indexOf('timestamp');

    titles.splice(j, 1);


    you may consider:

    delete ratings1.name;

    delete ratings1.timestamp;

    var titles = Object.keys(ratings1);


    But this will delete the 'name' & 'timestamp' keys from users object because of the referencing of ratings1 to users.

    or you can use Array.prototype.filter

    or just

    var titles = Object.keys(ratings1);


    var title = titles[i];

    if(title == 'name' || title == 'timestamp') continue;

    Just a tip to improve it! 😀

  7. movies.json file link: https://github.com/CodingTrain/website/blob/master/CodingChallenges/CC_070_3_movie_recommender/movies.json

  8. Does anybody know where I can get the original Star Wars data file, the github source code has a different .json file. I'm completely new to working with data so I am unable to translate what he's writing about moives.json so the code works on ratings.json.

  9. hai..i wanted to develop it in python…so which is the best IDE to develop..will you please suggest me..thank you

  10. a lot of your stuff is worth making into a gif. I've tried this: https://github.com/jnordberg/gif.js, but can't get it to work. I get GIF is undefined in gif.js. Any ideas?

  11. isn't the Pearson correlation kinda wrong in this case? how someone that rates movies 1-2 has similar taste than I do if I rate those movies 4-5? doesn't he have like the exactly oposite taste?

  12. why indexing by name? just setting the value of the selects by their position in the list is just much better

  13. You should create your own institude, the world need more teachers like you. BEST TEACHER EVER!!!!!!!!!!!!!!!!!
    Greatings from Venezuela :d

  14. you could of used something like titles.filter(checkIfUnwanted) to remove name and timestamp from the array

  15. When you were creating the name lookup table, did you ever consider setting the value of the dropdown menu to be the index of each user and the name of drop-down menu to be to be the human readable name? Then you shouldn't have the problem of doubling the space required for your application to run. Something like `<option value="${i}">${name}</option>`?

  16. Why do you never put the videos that you say will be in the description, into the description? Where's the "What is an associative array" video? Love the vids, but always frustrated when I look for the vid and it's not in the desc.

  17. What else interesting do you read? Can you recommend more books similar to Collective Inteligence that you mentioned at the start of the video? Thanks

  18. 15:23 Of course! I love your videoes Daniel! (As you can see, we have the same name 🙂 )
    Btw 16:57 You could have used forEach, if i remeber correctly?

  19. Really good and nice teacher 🙂 May be you already know http://scikit-learn.org/stable/ ( it's funny… ), and some ( i hope useful ) datasets… http://archive.ics.uci.edu/ml/datasets.html Thx…. 🙂

  20. You are just Awesome
    When I first saw your video, I taught we share the same age but no man I am 18 and you looks 18

  21. Some feedback:
    1) A dropdown (select) option can have a different value than its visual text, so I would use the index from the data loop as the value for every option. Whatever option is then selected, the selected value would match the user index of the data feed.

    2) The movies could be in a subarray/subobject. When looping through the data the first time (to create the options) you could re-/move the movie titles into a new subobject for every user, so you wouldn't have to get rid of name and timestamp. less code too.

    This should be less code overall and hopefully still be understandable for new coders 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *