{"id":23080621,"url":"https://github.com/chen0040/js-recommender","last_synced_at":"2025-08-15T22:31:05.593Z","repository":{"id":57283568,"uuid":"92137454","full_name":"chen0040/js-recommender","owner":"chen0040","description":"Package provides java implementation of content collaborative filtering for recommend-er system","archived":false,"fork":false,"pushed_at":"2017-06-05T00:38:34.000Z","size":58,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T09:06:17.935Z","etag":null,"topics":["content-collaborative-filtering","javascript","recommendation-algorithms","recommendation-engine","recommender-system"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chen0040.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-23T06:28:27.000Z","updated_at":"2025-07-10T04:47:22.000Z","dependencies_parsed_at":"2022-09-04T22:00:35.633Z","dependency_job_id":null,"html_url":"https://github.com/chen0040/js-recommender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chen0040/js-recommender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fjs-recommender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fjs-recommender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fjs-recommender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fjs-recommender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chen0040","download_url":"https://codeload.github.com/chen0040/js-recommender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chen0040%2Fjs-recommender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270637924,"owners_count":24620430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["content-collaborative-filtering","javascript","recommendation-algorithms","recommendation-engine","recommender-system"],"created_at":"2024-12-16T13:15:48.889Z","updated_at":"2025-08-15T22:31:05.332Z","avatar_url":"https://github.com/chen0040.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-recommender\nPackage provides java implementation of content collaborative filtering for recommend-er system\n\n[![Build Status](https://travis-ci.org/chen0040/js-recommender.svg?branch=master)](https://travis-ci.org/chen0040/js-recommender) [![Coverage Status](https://coveralls.io/repos/github/chen0040/js-recommender/badge.svg?branch=master)](https://coveralls.io/github/chen0040/js-recommender?branch=master) \n\n# Install\n\n```bash\nnpm install js-recommender\n```\n\n# Usage \n\nThe the direct use of the javascript in html can be found in [example.html](https://rawgit.com/chen0040/js-recommender/master/example.html).\n\nThe sample code below tries to predict the missing rating of [user, movie] as shown in the table below:\n\n![movie-recommender](images/movie-recommender.png)\n\n```javascript\nvar jsrecommender = require(\"js-recommender\");\n\nvar recommender = new jsrecommender.Recommender();\n      \nvar table = new jsrecommender.Table();\n\n  // table.setCell('[movie-name]', '[user]', [score]);\ntable.setCell('Love at last', 'Alice', 5);\ntable.setCell('Remance forever', 'Alice', 5);\ntable.setCell('Nonstop car chases', 'Alice', 0);\ntable.setCell('Sword vs. karate', 'Alice', 0);\ntable.setCell('Love at last', 'Bob', 5);\ntable.setCell('Cute puppies of love', 'Bob', 4);\ntable.setCell('Nonstop car chases', 'Bob', 0);\ntable.setCell('Sword vs. karate', 'Bob', 0);\ntable.setCell('Love at last', 'Carol', 0);\ntable.setCell('Cute puppies of love', 'Carol', 0);\ntable.setCell('Nonstop car chases', 'Carol', 5);\ntable.setCell('Sword vs. karate', 'Carol', 5);\ntable.setCell('Love at last', 'Dave', 0);\ntable.setCell('Remance forever', 'Dave', 0);\ntable.setCell('Nonstop car chases', 'Dave', 4);\n\nvar model = recommender.fit(table);\nconsole.log(model);\n\npredicted_table = recommender.transform(table);\n\nconsole.log(predicted_table);\n\n\nfor (var i = 0; i \u003c predicted_table.columnNames.length; ++i) {\n    var user = predicted_table.columnNames[i];\n    console.log('For user: ' + user);\n    for (var j = 0; j \u003c predicted_table.rowNames.length; ++j) {\n        var movie = predicted_table.rowNames[j];\n        console.log('Movie [' + movie + '] has actual rating of ' + Math.round(table.getCell(movie, user)));\n        console.log('Movie [' + movie + '] is predicted to have rating ' + Math.round(predicted_table.getCell(movie, user)));\n    }\n}\n```\n\nTo configure the recommender, can overwrite its parameters in its constructor:\n\n```javascript\nvar recommender = new jsrecommender.Recommender({\n    alpha: 0.01, // learning rate\n    lambda: 0.0, // regularization parameter\n    iterations: 500, // maximum number of iterations in the gradient descent algorithm\n    kDim: 2 // number of hidden features for each movie\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen0040%2Fjs-recommender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchen0040%2Fjs-recommender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchen0040%2Fjs-recommender/lists"}