
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
titan-recommendation-algorithm
Advanced tools
A dynamic and configurable recommendation algorithm for personalized content.
The Titan Recommendation Algorithm is a powerful and flexible video recommendation system designed to generate personalized video feeds based on user preferences, behaviors, and interactions. This package leverages a modular design, worker threads, and a robust scoring system to deliver highly relevant content to users.
User-Centric Recommendations: Personalize feeds using user preferences, location, feedback, and interaction history. Dynamic Scoring: Calculate video relevance based on engagement, novelty, social proof, and more. Modular Configuration: Easily customize weights, thresholds, and scoring logic through the Config interface. Worker Threads: Efficiently process large datasets with asynchronous workers. Diversity Support: Promote diverse recommendations by penalizing overused tags or creators.
To install the package, use npm:
npm install titan-recommendation-algorithm
Generate a Personalized Feed
import { generateFeed } from 'titan-recommendation-algorithm';
import { UserPreferences, UserData, Video } from './types';
const userPreferences: UserPreferences = {
preferredTags: ['comedy', 'education'],
minDuration: 10,
maxDuration: 300,
};
const userData: UserData = {
userLocation: 'New York',
rewatchedVideos: ['video1'],
};
const videos: Video[] = [
{
id: 'video1',
tags: ['comedy'],
duration: 120,
views: 1000,
engagementRate: 0.8,
uploadDate: '2023-12-01'
}, {
id: 'video2',
tags: ['sports'],
duration: 90,
views: 2000,
engagementRate: 0.6,
uploadDate: '2023-12-02'
},
];
generateFeed(
userPreferences,
userData,
videos
).then((feed) => {
console.log(feed)
}); // Outputs an array of sorted video IDs });
import { updateFeedback } from 'titan-recommendation-algorithm'; import { UserData } from './types';
const userData: UserData = {
rewatchedVideos: ['video1'],
feedback: { video1: 4 },
};
const updatedData = updateFeedback(userData, 'video2', 5); console.log(updatedData.feedback); // Outputs: { video1: 4, video2: 5 }
import { updateConfig, getConfig } from 'titan-recommendation-algorithm';
updateConfig({ noveltyScoreWeight: 0.5 }); console.log(getConfig().noveltyScoreWeight); // Outputs: 0.5
For detailed documentation on each function, interface, and configuration option, refer to the TSDoc comments in the source files.
We welcome contributions! See the CONTRIBUTING.md file for more details.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A dynamic and configurable recommendation algorithm for personalized content.
We found that titan-recommendation-algorithm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.