Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@asymmetrik/akin
Advanced tools
Readme
Recommendation Engine Library based on Collaborative Filtering. Node.js implementation using MongoDB via Mongoose.
Provides hooks for logging user activity on items referenced by an ObjectID and an optional item type. Additional methods provide execution of a scalable, collaborative filtering algorithm that outputs recommendation results for each user into a namespaced Mongo collections. These results can then be retrieved and integrated into the application as desired.
Include this module as a dependency of your application in the package.json
file. It also requires that MongooseJS is available as a peer dependency. For example:
{
...
dependencies: {
"mongoose": "~4.6",
"@asymmetrik/akin": "latest"
}
...
}
Include the module via require
wherever applicable:
var akin = require('@asymmetrik/akin');
The most fundamental use case of logging user activity, running the engine, and retrieving recommendations for a user is achieved via:
akin.activity.log(userId, itemId, { type: 'itemType' }, 'action');
...
akin.run();
...
akin.recommendation.getAllRecommendationsForUser(userId);
There are four classes that allow for managing activity logs and recalculating recommendations at a more granular level:
Manages query execution for schemas
do not recommend
for a user to stop them from returning in the sampling queryExecute the recommendation engine based on the data supplied to the activity.log() API
akin.run();
Add a user's activity on an item
akin.activity.log(userId, itemId, { type: 'itemType' }, 'actionType');
Remove a user's activity on an item
akin.activity.removeLog(userId, itemId, 'actionType');
Get all recommendations created for a user
akin.recommendation.getAllRecommendationsForUser(userId);
Get a sampling of recommendations created for a user based on a weighted cumulative distribution function
akin.recommendation.sampleRecommendationsForUser(userId, numberOfSamples);
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
@asymmetrik/akin
is MIT licensed.
FAQs
Recommendation Engine based on Collaborative Filtering
The npm package @asymmetrik/akin receives a total of 1 weekly downloads. As such, @asymmetrik/akin popularity was classified as not popular.
We found that @asymmetrik/akin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.