CoreRec#
Get Started
System requirements, pip install, optional dependencies, and verifying your setup.
Train your first model in under 5 minutes with a worked DCN example on MovieLens.
Architecture overview – engines, pipelines, retrieval/ranking/reranking stages.
Capabilities
Every model shares fit(), predict(), recommend(), save(), load(). Swap models without changing your code.
Retrieval, ranking, reranking – compose retrieval sources, scoring models, and post-processing in a single pipeline.
Collaborative, semantic, and popularity retrievers with ensemble fusion (RRF, weighted, union).
Pointwise, pairwise, and feature-cross rankers. Diversity, fairness, and business-rule rerankers.
Batch inference, model loading, and a lightweight model server for production deployment.
Model Categories
29 models – DCN, DeepFM, DIEN, DIN, DLRM, Wide&Deep, and more.
9 models – SVD, ALS, NMF, and advanced variants.
6 models – GNNRec, LightGCN, graph neural networks.
6 models – SASRec, MIND, Caser, NextItNet.
3 models – BPR, BPRMF, VMF.
Quick Example
from corerec.engines.dcn import DCN
from cr_learn import ml_1m
from sklearn.model_selection import train_test_split
# pip install "corerec[datasets]" first
data = ml_1m.load()
train_df, _ = train_test_split(data['ratings'], test_size=0.2, random_state=42)
model = DCN(embedding_dim=64, epochs=20, verbose=True)
model.fit(user_ids=train_df['user_id'].values, item_ids=train_df['movie_id'].values,
ratings=train_df['rating'].values)
recs = model.recommend(user_id=1, top_k=10)
model.save('artifacts/dcn')
Learn More
Step-by-step tutorials for every model – DCN, DeepFM, SASRec, LightGCN, and 50+ more.
Data preparation, training, predictions, persistence, and best practices.
Full API documentation for all modules – engines, pipelines, retrieval, ranking, evaluation.
Index – Module Index – Search Page