Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,11 @@ KMR is optimized for performance with:
- **Memory Optimization**: Careful memory management in complex layers
- **Batch Processing**: Optimized for batch operations

## 🔮 Roadmap
## 💬 Join Our Community

- [ ] **v0.3.0**: Additional model architectures and pre-trained models
- [ ] **v0.4.0**: Integration with popular ML frameworks
- [ ] **v0.5.0**: Model zoo with pre-trained weights
- [ ] **v1.0.0**: Production-ready with comprehensive benchmarks
Have questions or want to connect with other KDP users? Join us on Discord:

[![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/bhvGunkF)

## 📄 License

Expand All @@ -301,6 +300,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
- **Issues**: [GitHub Issues](https://github.com/UnicoLab/keras-model-registry/issues)
- **Discussions**: [GitHub Discussions](https://github.com/UnicoLab/keras-model-registry/discussions)
- **Documentation**: [Online Docs](https://unicolab.github.io/keras-model-registry/)
- **Discort**: [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/bhvGunkF)

---

Expand Down
72 changes: 72 additions & 0 deletions docs/api/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,75 @@ Detects anomalies in numerical features using statistical methods.
Detects anomalies in categorical features.

::: kmr.layers.CategoricalAnomalyDetectionLayer

## 📊 Recommendation Systems

### 👥 CollaborativeUserItemEmbedding
Dual embedding lookup layer for collaborative filtering with separate user and item embedding tables.

::: kmr.layers.CollaborativeUserItemEmbedding

### 🏢 DeepFeatureTower
Dense neural network tower for processing user or item features in two-tower recommendation architectures.

::: kmr.layers.DeepFeatureTower

### 📏 NormalizedDotProductSimilarity
Compute normalized dot product (cosine) similarity between user and item representations.

::: kmr.layers.NormalizedDotProductSimilarity

### 🏆 TopKRecommendationSelector
Select top-K recommendation items based on scores with efficient heap-based selection.

::: kmr.layers.TopKRecommendationSelector

### 🔢 DynamicBatchIndexGenerator
Generate dynamic batch indices for grouping and indexing operations in recommendation systems.

::: kmr.layers.DynamicBatchIndexGenerator

### 📐 TensorDimensionExpander
Expand tensor dimensions for broadcasting and reshaping operations in recommendation pipelines.

::: kmr.layers.TensorDimensionExpander

### 🎭 ThresholdBasedMasking
Apply threshold-based masking to filter values in geospatial and recommendation systems.

::: kmr.layers.ThresholdBasedMasking

### 🌍 HaversineGeospatialDistance
Compute Haversine great-circle distance between geographic coordinates for location-based recommendations.

::: kmr.layers.HaversineGeospatialDistance

### 🗺️ SpatialFeatureClustering
Cluster spatial features into geographic regions for location-aware recommendation filtering.

::: kmr.layers.SpatialFeatureClustering

### 📍 GeospatialScoreRanking
Rank recommendations based on geospatial clustering features for location-aware recommendations.

::: kmr.layers.GeospatialScoreRanking

### 🧠 DeepFeatureRanking
Deep neural network tower for feature-based ranking in learning-to-rank models.

::: kmr.layers.DeepFeatureRanking

### ⚖️ LearnableWeightedCombination
Combine multiple recommendation scores with learnable softmax-normalized weights for hybrid recommendations.

::: kmr.layers.LearnableWeightedCombination

### 🔍 CosineSimilarityExplainer
Compute and explain cosine similarity between embeddings for interpretable recommendations.

::: kmr.layers.CosineSimilarityExplainer

### 💬 FeedbackAdjustmentLayer
Adjust recommendation scores based on user feedback signals for adaptive recommendations.

::: kmr.layers.FeedbackAdjustmentLayer
86 changes: 86 additions & 0 deletions docs/api/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,92 @@ Advanced autoencoder model for anomaly detection with optional preprocessing int

::: kmr.models.autoencoder.Autoencoder

## 📊 Recommendation Systems

### 🗺️ GeospatialClusteringModel
Unsupervised geospatial clustering recommendation model using distance-based clustering and spatial ranking.

::: kmr.models.GeospatialClusteringModel

**Key Features:**
- Haversine distance calculation for geographic coordinates
- Spatial feature clustering into geographic regions
- Geospatial score ranking based on proximity
- Unsupervised learning with entropy and variance losses
- Configurable training mode (supervised/unsupervised)

### 📈 MatrixFactorizationModel
Matrix factorization recommendation model using collaborative filtering with user and item embeddings.

::: kmr.models.MatrixFactorizationModel

**Key Features:**
- Dual user-item embedding lookups
- Normalized dot product similarity computation
- Top-K recommendation selection
- L2 regularization on embeddings
- Scalable to millions of users/items

### 🏗️ TwoTowerModel
Two-tower recommendation model with separate towers for user and item features.

::: kmr.models.TwoTowerModel

**Key Features:**
- Separate deep feature towers for users and items
- Normalized dot product similarity between towers
- Content-based feature processing
- Batch normalization and dropout for regularization
- Efficient similarity computation

### 🧠 DeepRankingModel
Deep neural network ranking model for learning-to-rank recommendations.

::: kmr.models.DeepRankingModel

**Key Features:**
- Deep feature ranking with multiple dense layers
- Combined user-item feature processing
- Batch normalization and dropout
- Learning-to-rank optimization
- Complex non-linear ranking functions

### 🤝 UnifiedRecommendationModel
Unified recommendation model combining collaborative filtering, content-based, and hybrid approaches.

::: kmr.models.UnifiedRecommendationModel

**Key Features:**
- Multiple recommendation components (CF, CB, Hybrid)
- Score combination with learnable weights
- Flexible architecture for different data types
- End-to-end learning of optimal combination
- Production-ready hybrid system

### 🔍 ExplainableRecommendationModel
Explainable recommendation model with similarity explanations and feedback adjustment.

::: kmr.models.ExplainableRecommendationModel

**Key Features:**
- Cosine similarity explanations for transparency
- User feedback integration
- Interpretable similarity scores
- Feedback-aware score adjustment
- Transparent recommendation reasoning

### 🎯 ExplainableUnifiedRecommendationModel
Explainable unified recommendation model combining multiple approaches with transparency features.

::: kmr.models.ExplainableUnifiedRecommendationModel

**Key Features:**
- Multiple recommendation components with explanations
- Component-level similarity scores
- Transparent weight learning
- Explainable hybrid recommendations
- Full interpretability across all components

## 🔧 Base Classes

### 🏛️ BaseModel
Expand Down
47 changes: 25 additions & 22 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>

!!! success "🎯 Production-Ready Tabular AI"
Build sophisticated tabular models with **38+ specialized layers**, **smart preprocessing**, and **intelligent feature engineering** - all designed exclusively for Keras 3.
Build sophisticated tabular models with **50+ specialized layers**, **smart preprocessing**, **intelligent feature engineering**, and **recommendation systems** - all designed exclusively for Keras 3.

---

Expand All @@ -20,7 +20,8 @@ KMR (Keras Model Registry) is a comprehensive collection of **production-ready l
- 🧠 **Advanced Attention Mechanisms** for tabular data
- 🔧 **Feature Engineering Layers** for data preprocessing
- 🏗️ **Pre-built Models** for common ML tasks
- 📊 **Data Analysis Tools** for intelligent layer recommendations
- 📊 **Recommendation Systems** with collaborative filtering, content-based, and geospatial models
- 📈 **Data Analysis Tools** for intelligent layer recommendations
- ⚡ **Keras 3 Native** - No TensorFlow dependencies in production code

!!! tip "Why KMR?"
Expand All @@ -33,9 +34,9 @@ KMR (Keras Model Registry) is a comprehensive collection of **production-ready l

<div class="grid cards" markdown>

- **38+ Production Layers**
- **50+ Production Layers**

Advanced attention mechanisms, feature processing, and specialized architectures ready for production use.
Advanced attention mechanisms, feature processing, recommendation systems, and specialized architectures ready for production use.

[Explore All Layers →](api/layers.md){ .md-button .md-button--primary }

Expand Down Expand Up @@ -198,29 +199,31 @@ KMR (Keras Model Registry) is a comprehensive collection of **production-ready l

=== "🛒 E-commerce Recommendations"

Build user-item interaction models:
Build recommendation systems with collaborative filtering and content-based features:

```python
from kmr.layers import TabularAttention, GatedFeatureFusion

user_features = keras.Input(shape=(20,))
item_features = keras.Input(shape=(15,))

user_repr = TabularAttention(
num_heads=4, head_dim=16
)(keras.layers.Concatenate()(
[user_features, item_features]
))

fused = GatedFeatureFusion()([user_repr, item_features])
compatibility = keras.layers.Dense(1)(fused)
model = keras.Model(
inputs=[user_features, item_features],
outputs=compatibility
from kmr.models import MatrixFactorizationModel, TwoTowerModel

# Option 1: Collaborative Filtering
model = MatrixFactorizationModel(
num_users=10000,
num_items=5000,
embedding_dim=64,
top_k=10
)

# Option 2: Content-Based (Two-Tower)
model = TwoTowerModel(
user_feature_dim=20,
item_feature_dim=15,
output_dim=64,
top_k=10
)

model.compile(optimizer='adam', loss='binary_crossentropy')
```

**Use case:** Product recommendations, CTR prediction, customer lifetime value
**Use case:** Product recommendations, CTR prediction, customer lifetime value, personalized search

---

Expand Down
Loading
Loading