Discover the power of graph analysis and recommendation with CoreRec & VishGraphs. Dive into our comprehensive manual and explore the endless possibilities.
CoreRec is your all-in-one recommendation engine for graph-based algorithms. Seamlessly integrating advanced neural network architectures, CoreRec excels in node recommendations, model training, and graph visualizations, making it the ultimate tool for data scientists and researchers. VishGraphs is your ultimate Python library for graph visualization and analysis. Whether you're a data scientist, researcher, or hobbyist, VishGraphs offers intuitive tools to generate, visualize, and analyze graphs effortlessly.
Note: last updated: 2024-11-20
-
GraphTransformer(num_layers, d_model, num_heads, d_feedforward, input_dim)
- A Transformer model for graph data with customizable parameters.
-
GraphDataset(adj_matrix)
- A PyTorch dataset for graph data, streamlining model training.
-
train_model(model, data_loader, criterion=False, optimizer=False, num_epochs=False)
- Train your model with ease using our flexible training function.
-
predict(model, graph, node_index, top_k=5)
- Predict similar nodes with precision using trained models.
-
aaj_accuracy(graph, node_index, recommended_indices)
- Measure the accuracy of your recommendations with our robust metrics.
-
generate_large_random_graph(num_people, file_path="large_random_graph.csv", seed=None)
- Generate and save large random graphs effortlessly.
-
draw_graph(adj_matrix, top_nodes=None, recommended_nodes=None, node_labels=None, transparent_labeled=True, edge_weights=None)
- Create stunning 2D visualizations of your graphs.
-
draw_graph_3d(adj_matrix, top_nodes=None, recommended_nodes=None, node_labels=None, transparent_labeled=True, edge_weights=None)
- Experience your graphs in 3D with customizable features.
-
show_bipartite_relationship(adj_matrix)
- Visualize bipartite relationships with clarity.
Install sspipe using pip:
pip install --upgrade corerec
Then import it in your scripts.
import engine.core_rec as cr
import engine.vish_graphs as vg
In case you wanna use optimizers from corerec. Eg:
from engine.cr_boosters.adam import Adam
CoreRec has Various in-built optimizers for training models.
- Adam
- Nadam
- Adamax
- Adadelta
- Adagrad
- ASGD
- LBFGS
- RMSprop
- SGD
- SparseAdam
- CoreRec: CoreRec is a cutting-edge recommendation engine for graph data analysis and visualization. It excels in recommending similar nodes, training machine learning models, and visualizing complex network structures.
- VishGraphs: VishGraphs is a Python library designed for graph visualization and analysis. It offers tools for generating random graphs, drawing graphs in 2D and 3D, and analyzing graph properties.
Description | Quick Access |
---|---|
Core recommendation engine components and utilities | └── corerec/ ├── cr_boosters/ │ ├── adam.py │ ├── adamax.py │ ├── adadelta.py │ ├── adagrad.py │ ├── asgd.py │ ├── lbfgs.py │ ├── nadam.py │ ├── optimizer.py │ ├── rmsprop.py │ ├── sgd.py │ └── sparse_adam.py ├── cr_pkg/ │ ├── gat_conv.py │ ├── gcn_conv.py │ ├── han_conv.py │ └── sage_conv.py ├── engines/ │ ├── contentFilterEngine/ │ │ └── traditional_ml_algorithms/ │ │ └── decision_tree.py │ ├── unionizedFilterEngine/ │ │ └── nn_base/ │ │ └── BST_base.py │ └── test_struct_UF/ │ ├── graph_based_algorithms/ │ │ ├── geoimc_base.py │ │ └── lightgcn_base.py │ └── neural_network_based_algorithms/ │ └── xdeepfm_base.py ├── preprocessing/ │ └── __init__.py ├── torch_utils/ │ ├── benchmark/ │ │ └── examples/ │ │ └── prepare_e2e.sh │ ├── model_dump/ │ │ ├── code.js │ │ ├── htm.mjs │ │ └── preact.mjs │ ├── viz/ │ │ └── MemoryViz.js │ ├── _cxx_pytree.py │ └── _pytree.py ├── output/ │ └── __init__.py ├── cr_utility/ │ ├── dataloader.py │ └── dataset.py ├── core_rec.py ├── datasets.py ├── metrics.py ├── predict.py └── train.py |
Generate random graphs effortlessly with the generate_random_graph
function:
import vish_graphs as vg
graph_file = vg.generate_random_graph(10, "random_graph.csv")
Welcome to a world of cutting-edge graph analysis and recommendation tools brought to you by VishGraphs and CoreRec. Uncover the potential of data visualization and machine learning in a sophisticated manner.
🔗 Explore Detailed UseCases Here 🔗
import core_rec as cs
Main Algorithm CoreRec Provides Based on Transformer Architecture works fine with PyTorch, CoreRec etc. In Simple terms it uses DNG Score to rank prediction of surrondings of Target node Providing a Enhanced way to compute Attention.
Use case: Providing recommendations for nodes based on their similarity within a graph.
GraphTransformerV2 adds dropout and layer normalization, enhancing robustness compared to GraphTransformer's simpler architecture.
Use case: More Evolved Training machine learning models for graph-related tasks, such as node classification or link prediction.
Defines a PyTorch dataset for graph data, allowing easy integration with DataLoader for model training.
Use case: Preparing graph data for training machine learning models.
Trains a given model using the provided data loader, loss function, optimizer, and number of epochs.
Use case: Training machine learning models for graph-related tasks using graph data.
In the test.py
file, various functionalities from vish_graphs.py
and core_rec.py
are utilized and demonstrated:
- Random graph generation (
generate_random_graph
). - Identification of top nodes in a graph (
find_top_nodes
). - Training a Transformer model for graph data (
GraphTransformerV2
,GraphDataset
,train_model
). - Recommending similar nodes using a trained model (
recommend_similar_nodes
). - Visualization of a graph in 3D (
draw_graph_3d
).
import vishgraphs as vg
Generate a random graph with a specified number of people and save the adjacency matrix to a CSV file.
Use case: Generating synthetic graph data for testing algorithms or simulations.
Draw a 2D visualization of a graph based on its adjacency matrix, highlighting top nodes if specified.
Use case: Visualizing relationships within a graph dataset.
Identify the top nodes with the greatest number of strong correlations in a graph.
Use case: Identifying influential or highly connected nodes in a network.
Create a 3D visualization of a graph based on its adjacency matrix, with optional highlighting of top nodes.
Use case: Visualizing complex network structures in a three-dimensional space.
Visualize bipartite relationships in a graph using cosine similarity and community detection algorithms.
Use case: Analyzing relationships between different sets of nodes in a bipartite graph.
Read a CSV file containing a bipartite adjacency matrix and return it as a list.
Use case: Preparing data for analyzing bipartite networks.
Explore the codebase and utilize these functionalities for your graph analysis and recommendation tasks! If you have any questions or need further assistance, don't hesitate to reach out. Happy graph analyzing! 📊🔍
VishGraphs supports drawing graphs in both 2D and 3D:
adj_matrix = vishgraphs.bipartite_matrix_maker(graph_file)
nodes = list(range(len(adj_matrix)))
top_nodes = [0, 1, 2] # Example top nodes
vishgraphs.draw_graph(adj_matrix, nodes, top_nodes)
These are the humans that form the CoreRec's core team, which runs the project. (Team is not yet decided)
@vishesh9131 |
---|
Founder / Creator |
For issues with CoreRec and VishGraphs:
- Check Documentation: Ensure you're following the library's guidelines and examples correctly.
- GitHub Issues: Report bugs or seek help by creating an issue on the GitHub repository.
- Verify Data: Confirm that your input data is correctly formatted and compatible.
- Model Parameters: Double-check model configurations and training parameters.
- Visualization Inputs: Ensure correct parameters for graph visualization functions.
- Community Help: Utilize community forums for additional support.
This streamlined approach should help resolve common issues efficiently.
We welcome contributions to enhance the functionalities of our graph analysis and recommendation tools. If you're interested in contributing, here are a few ways you can help:
- Bug Fixes: Identify and fix bugs in the existing code.
- Feature Enhancements: Suggest and implement improvements to current features.
- New Features: Propose and develop new features that could benefit users of the libraries.
- Documentation: Help improve the documentation to make the libraries more user-friendly.
- Fork the repository.
- Create a new branch for your feature or fix.
- Develop your changes while adhering to the coding standards and guidelines.
- Submit a pull request with a clear description of the changes and any relevant issue numbers.
Your contributions are greatly appreciated and will help make these tools more effective and accessible to everyone!
VishGraphs is distributed under the following terms:The library and utilities are only for research purposes. Please do not use it commercially without the author's (@Vishesh9131) consent.