TensorRec: A TensorFlow Recommendation Framework in Python

This repository profile is provided by osrepos.com, an open source repository discovery platform.

TensorRec: A TensorFlow Recommendation Framework in Python

Summary

TensorRec is a Python recommendation system built on TensorFlow, designed for quickly developing and customizing recommendation algorithms. It allows users to define custom representation and loss functions while handling data manipulation, scoring, and ranking. Although not under active development, it provides a solid foundation for understanding and implementing recommender systems.

Repository Information

Analyzed by OSRepos on May 17, 2026

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

TensorRec is a powerful Python recommendation system built on TensorFlow, allowing developers to quickly create and customize recommendation algorithms. It provides a flexible framework where you can define your own representation or embedding functions and loss functions, while TensorRec efficiently manages the underlying data manipulation, scoring, and ranking processes to generate recommendations.

It's important to note that TensorRec is not under active development. However, the maintainer is open to reviewing pull requests, making it a valuable resource for learning and exploring TensorFlow-based recommender systems. A TensorRec system processes three key data inputs: user_features, item_features, and interactions, using them to learn and produce ranked recommendations.

Installation

Getting started with TensorRec is straightforward. You can install it using pip:

pip install tensorrec

Examples

Here's a basic example demonstrating how to use TensorRec to build, fit, and evaluate a recommendation model:

import numpy as np
import tensorrec

# Build the model with default parameters
model = tensorrec.TensorRec()

# Generate some dummy data
interactions, user_features, item_features = tensorrec.util.generate_dummy_data(
    num_users=100,
    num_items=150,
    interaction_density=.05
)

# Fit the model for 5 epochs
model.fit(interactions, user_features, item_features, epochs=5, verbose=True)

# Predict scores and ranks for all users and all items
predictions = model.predict(user_features=user_features,
                            item_features=item_features)
predicted_ranks = model.predict_rank(user_features=user_features,
                                     item_features=item_features)

# Calculate and print the recall at 10
r_at_k = tensorrec.eval.recall_at_k(predicted_ranks, interactions, k=10)
print(np.mean(r_at_k))

Why Use TensorRec?

TensorRec offers a flexible approach to building recommendation systems, allowing deep customization of core components like representation and loss functions. It abstracts away much of the boilerplate, enabling developers to focus on the algorithm's logic and experimentation.

While development is not active, its well-structured design and clear examples make it an excellent educational tool for understanding TensorFlow-based recommenders. For those seeking actively maintained alternatives, the project maintainer suggests exploring TensorFlow Ranking, Spotlight, or LightFM.

Links

Related repositories

Similar repositories that may be relevant next.

Mocket: A Comprehensive Socket Mocking Framework for Python

Mocket: A Comprehensive Socket Mocking Framework for Python

August 3, 2026

Mocket is a powerful Python framework designed for monkey-patching the `socket` and `ssl` modules, enabling robust testing of network-dependent applications. It serves as both a low-level framework for building custom clients and a ready-to-use mock for HTTP/HTTPS calls, supporting various environments including asyncio and MicroPython. This tool simplifies the process of isolating and testing Python clients that communicate over the socket protocol.

pythontestingmocking
Awesome CSS Frameworks: A Curated List for Modern Web Development

Awesome CSS Frameworks: A Curated List for Modern Web Development

July 14, 2026

Discover 'Awesome CSS Frameworks', a comprehensive GitHub repository featuring a meticulously curated list of CSS frameworks for 2026. This invaluable resource categorizes frameworks by type, from minimalist class-less options to robust general-purpose solutions. It is an essential tool for developers seeking the right styling foundation for their projects.

csscss-frameworkawesome-list
Griptape: Modular Python Framework for AI Agents and Workflows

Griptape: Modular Python Framework for AI Agents and Workflows

July 5, 2026

Griptape is a modular Python framework designed to simplify the development of generative AI applications. It provides a flexible set of abstractions for working with Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), and various other AI components. With its structured approach, Griptape enables developers to build sophisticated AI agents and workflows efficiently.

aipythonllm
GHunt: An Offensive Google Framework for OSINT and Data Collection

GHunt: An Offensive Google Framework for OSINT and Data Collection

May 16, 2026

GHunt is a powerful Python-based offensive Google framework primarily focused on Open-Source Intelligence (OSINT), designed for efficient evolution. It offers robust CLI usage, Python library integration, and fully asynchronous operations, making it a versatile tool for gathering information related to Google services. With features like JSON export and a companion browser extension for streamlined login, GHunt simplifies the process of digital data collection.

googleosintpython

Source repository

Open the original repository on GitHub.

18 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️