CoreRec

CoreRec

CoreRec excels in node recommendations, model training, and graph visualizations, making it the ultimate tool for data scientists and researchers.

CoreRecommendation Engine

CoreRec offers a robust recommendation system based on graph analysis. It can recommend similar nodes within a graph, aiding in various applications such as personalized recommendations in social networks or product recommendations in e-commerce platforms.

Advanced Graph Analysis

CoreRec provides cutting-edge tools for analyzing complex graph structures, making it ideal for data scientists and researchers.

Node Recommendation Engine

Utilize CoreRec's powerful engine to recommend similar nodes within a graph, enhancing user experience and engagement.

Customizable Transformer Model

Define and train Transformer models tailored to your graph data with customizable parameters for optimal performance.

PyTorch Dataset Integration

Seamlessly integrate graph data with PyTorch datasets, streamlining the model training process.

Flexible Model Training

Train your models with ease using CoreRec's flexible training functions, supporting various configurations.

Accurate Recommendation Metrics

Measure the accuracy of your recommendations with robust metrics provided by CoreRec.

2D Graph Visualizations

Create stunning 2D visualizations of your graphs, making data analysis more intuitive and insightful.

3D Graph Visualizations

Experience your graphs in 3D with customizable features, providing a deeper understanding of complex networks.

Everything You Need for Next-Gen Recommendations

A comprehensive suite of tools for researchers and developers.

Intelligent Recommendation

Sophisticated node recommendation engine powered by advanced graph algorithms.

Customizable Models

Build and train bespoke Transformer & GNN models tailored to your specific data.

High Performance

Optimized for speed with support for Data Parallelism processing for large datasets.

PyTorch Integration

Seamlessly integrate your graph data with PyTorch datasets for streamlined workflows.

Rich Visualizations

Generate insightful 2D and 3D graph visualizations to better understand your data.

Accurate Metrics

Evaluate your model's performance with a robust suite of recommendation metrics.

Get Started Quickly

Explore the core functionalities of CoreRec with these examples.

Load Data & Build Interactions

A simple example to get you started with loading data and preparing user interactions for analysis.


import corerec as cr

# Load data from specified paths
    users = cr.load_users('data/users.dat')
    ratings = cr.load_ratings('data/ratings.dat')
    movies = cr.load_movies('data/movies.dat')

# Build user-item interaction matrix
user_interactions = cr.build_user_interactions(ratings)
print("User interactions created successfully.")
                        

Context-Aware Recommendations

Leverage contextual information like time of day or location to provide highly relevant recommendations.


import corerec as cr
    
# Pre-computation of item features
    item_features = cr.build_item_features(movies)
    
# Initialize and fit the context-aware model
recommender = cr.CON_CONTEXT_AWARE(
    context_config_path='data/context_config.json',
        item_features=item_features
    )
recommender.fit(user_interactions)

# Get recommendations for a specific user and context
recs = recommender.recommend(user_id=1, context={'time': 'evening'}, top_n=5)
print(recs)
                        

CNN-Based Recommender

Use a Convolutional Neural Network to learn features from item content for recommendations.


import torch
from corerec.cr_utility.dataloader import DataLoader as CRDataLoader
from corerec.engines.contentFilterEngine.nn_based_algorithms import NN__CNN

# Assuming a custom PyTorch dataset `MoviesDataset`
    dataset = MoviesDataset(file_path='data/movies.dat')
    dataloader = CRDataLoader(dataset, batch_size=32, shuffle=True)

# Initialize the model, loss, and optimizer
model = NN__CNN(input_dim=20, num_classes=5)
    criterion = torch.nn.BCELoss()
    optimizer = torch.optim.Adam(model.parameters(), lr=0.001)

# Training loop
    train_model(model, dataloader, criterion, optimizer, num_epochs=10, device='cpu')
                        

Transformer & RNN Models

Implement state-of-the-art sequence models for powerful session-based recommendations.


from corerec.engines.contentFilterEngine.nn_based_algorithms import NN__TransformerModel

# Assuming a custom PyTorch dataset `MoviesDataset`
    dataset = MoviesDataset(file_path='data/movies.dat')
    dataloader = DataLoader(dataset, batch_size=32, shuffle=True)

# Initialize Transformer model
transformer_model = NN__TransformerModel(input_dim=500, nhead=5, num_layers=2)
    criterion = torch.nn.BCELoss()
optimizer = torch.optim.Adam(transformer_model.parameters(), lr=0.001)

# Train the model
train_model(transformer_model, dataloader, criterion, optimizer, num_epochs=5, device='cpu')
                        

License

CoreRec and VishGraphs are completely open source projects. We highly support and encourage open source contributions. You are free to use, modify, and distribute the code as long as you adhere to the terms of the open source license.

[Tip for developers]: If you find this project useful, consider contributing back to the community by submitting bug fixes, feature enhancements, or documentation improvements.

If you want to support the development of these open source projects, you can star the repository on GitHub. Thank you for your support!

Vishesh Yadav

Vishesh Yadav

Creator of CoreRec

Let's Build Together

Have a project in mind, a question about CoreRec, or just want to connect? Drop me a line.